aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgastineau <gastineau@imcce.fr>2021-09-20 19:53:19 +0200
committerGitHub <noreply@github.com>2021-09-20 10:53:19 -0700
commit50f702b1fec1ffae1c0c1ca1935628334ceb0e47 (patch)
tree3e2b1baf6a94e85b848e7d6d3cea1f2e311b8525
parent10463fcad3e30e2c9a9c628a375e2340dd1f5705 (diff)
downloadvcpkg-50f702b1fec1ffae1c0c1ca1935628334ceb0e47.tar.gz
vcpkg-50f702b1fec1ffae1c0c1ca1935628334ceb0e47.zip
[calceph] Add new port (#19759)
* initial port of calceph * apply correct format on vcpkg.json * add quotes in portfile * Update version database * add url to the documentation * Update version database * update vcpkg.json * update version * delete error version * remove useless on operating system * update database version * Apply suggestions from code review applied suggested changes about versions Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * update port number * update database version * format vcpkg.json * update version * update portfile.cmake error * update version * update portfile.cmake error * update portfile.cmake error * fix clflags in debug mode * update database version * add the debug flags * update version database * add space to avoid single quote for cflags in Makefile.vc * update version database * Update version database. Co-authored-by: Gastineau <Mickael.Gastineau@obspm.fr> Co-authored-by: Jonliu1993 <13720414433@163.com> Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
-rwxr-xr-xports/calceph/makefilevc.patch56
-rwxr-xr-xports/calceph/portfile.cmake51
-rwxr-xr-xports/calceph/vcpkg.json8
-rw-r--r--versions/baseline.json4
-rw-r--r--versions/c-/calceph.json9
5 files changed, 128 insertions, 0 deletions
diff --git a/ports/calceph/makefilevc.patch b/ports/calceph/makefilevc.patch
new file mode 100755
index 000000000..796eeb202
--- /dev/null
+++ b/ports/calceph/makefilevc.patch
@@ -0,0 +1,56 @@
+diff --git a/doc/Makefile.vc b/doc/Makefile.vc
+index 60c7eee..1e783a0 100644
+--- a/doc/Makefile.vc
++++ b/doc/Makefile.vc
+@@ -62,7 +62,7 @@
+ #
+
+ install:
+- copy calceph_c.pdf $(DESTDIR)\doc
+- copy calceph_fortran2003.pdf $(DESTDIR)\doc
+- copy calceph_fortran77.pdf $(DESTDIR)\doc
+- copy calceph_python.pdf $(DESTDIR)\doc
++ copy calceph_c.pdf "$(DESTDIR)"\doc
++ copy calceph_fortran2003.pdf "$(DESTDIR)"\doc
++ copy calceph_fortran77.pdf "$(DESTDIR)"\doc
++ copy calceph_python.pdf "$(DESTDIR)"\doc
+diff --git a/mexapi/src/Makefile.vc b/mexapi/src/Makefile.vc
+index 68e5d45..803c12f 100644
+--- a/mexapi/src/Makefile.vc
++++ b/mexapi/src/Makefile.vc
+@@ -62,10 +62,10 @@
+ #
+
+ install:
+- copy interfacemex.c $(DESTDIR)\libexec\calceph\mex
+- copy CalcephBin.m $(DESTDIR)\libexec\calceph\mex
+- copy calceph_compilemex.m $(DESTDIR)\libexec\calceph\mex
+- copy Constants.m $(DESTDIR)\libexec\calceph\mex
+- copy calceph_getversion_str.m $(DESTDIR)\libexec\calceph\mex
+- copy NaifId.m $(DESTDIR)\libexec\calceph\mex
+- copy calceph_seterrorhandler.m $(DESTDIR)\libexec\calceph\mex
++ copy interfacemex.c "$(DESTDIR)"\libexec\calceph\mex
++ copy CalcephBin.m "$(DESTDIR)"\libexec\calceph\mex
++ copy calceph_compilemex.m "$(DESTDIR)"\libexec\calceph\mex
++ copy Constants.m "$(DESTDIR)"\libexec\calceph\mex
++ copy calceph_getversion_str.m "$(DESTDIR)"\libexec\calceph\mex
++ copy NaifId.m "$(DESTDIR)"\libexec\calceph\mex
++ copy calceph_seterrorhandler.m "$(DESTDIR)"\libexec\calceph\mex
+diff --git a/src/Makefile.vc b/src/Makefile.vc
+index 730b4a7..9e790b1 100644
+--- a/src/Makefile.vc
++++ b/src/Makefile.vc
+@@ -111,9 +111,9 @@ clean:
+ # install target: "nmake /f Makefile.vc install DESTDIR=xxx" to perform the installation.
+ #
+ install: all $(F2003INSTALL)
+- copy f90calceph.h $(DESTDIR)\include
+- copy calceph.h $(DESTDIR)\include
+- copy $(LIBRARY) $(DESTDIR)\lib
++ copy f90calceph.h "$(DESTDIR)"\include
++ copy calceph.h "$(DESTDIR)"\include
++ copy $(LIBRARY) "$(DESTDIR)"\lib
+
+ f2003install :
+- copy f2003calceph.mod $(DESTDIR)\include
++ copy f2003calceph.mod "$(DESTDIR)"\include
diff --git a/ports/calceph/portfile.cmake b/ports/calceph/portfile.cmake
new file mode 100755
index 000000000..42acc5e59
--- /dev/null
+++ b/ports/calceph/portfile.cmake
@@ -0,0 +1,51 @@
+vcpkg_fail_port_install(ON_TARGET "uwp")
+
+set(CALCEPH_VERSION "3.5.0")
+set(CALCEPH_HASH 12bb269d846aab93799656919cd9ca5a995248fb806727ea95667374b9380ca8f52c57dc6a5930c6995c13749bff1459c430eb2908b1533a8804fcb6b95c3de9)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://www.imcce.fr/content/medias/recherche/equipes/asd/calceph/calceph-${CALCEPH_VERSION}.tar.gz"
+ FILENAME "calceph-${CALCEPH_VERSION}.tar.gz"
+ SHA512 ${CALCEPH_HASH}
+)
+
+vcpkg_extract_source_archive_ex(
+ OUT_SOURCE_PATH SOURCE_PATH
+ ARCHIVE ${ARCHIVE}
+ PATCHES makefilevc.patch
+)
+
+if (VCPKG_TARGET_IS_WINDOWS)
+
+ vcpkg_install_nmake(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ OPTIONS_DEBUG
+ DESTDIR="${CURRENT_INSTALLED_DIR}/calceph/debug"
+ CFLAGS="${VCPKG_C_FLAGS_DEBUG} "
+ OPTIONS_RELEASE
+ DESTDIR="${CURRENT_INSTALLED_DIR}/calceph"
+ CFLAGS="${VCPKG_C_FLAGS_RELEASE} "
+ )
+ file(INSTALL "${CURRENT_INSTALLED_DIR}/calceph/include/calceph.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
+ file(INSTALL "${CURRENT_INSTALLED_DIR}/calceph/lib/libcalceph.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
+ file(INSTALL "${CURRENT_INSTALLED_DIR}/calceph/debug/lib/libcalceph.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
+ file(REMOVE_RECURSE "${CURRENT_INSTALLED_DIR}/calceph")
+
+else() # Build in UNIX
+ vcpkg_configure_make(
+ AUTOCONFIG
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS ${OPTIONS}
+ --enable-fortran=no
+ --enable-thread=yes
+ )
+
+ vcpkg_install_make()
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+endif()
+
+ file(INSTALL "${SOURCE_PATH}/README.rst" DESTINATION "${CURRENT_PACKAGES_DIR}/share/calceph" RENAME readme.rst)
+ file(INSTALL "${SOURCE_PATH}/COPYING_CECILL_B.LIB" DESTINATION "${CURRENT_PACKAGES_DIR}/share/calceph" RENAME copyright)
+ file(INSTALL "${SOURCE_PATH}/doc/calceph_c.pdf" DESTINATION "${CURRENT_PACKAGES_DIR}/share/calceph" RENAME calceph_c.pdf)
diff --git a/ports/calceph/vcpkg.json b/ports/calceph/vcpkg.json
new file mode 100755
index 000000000..72c91d1d9
--- /dev/null
+++ b/ports/calceph/vcpkg.json
@@ -0,0 +1,8 @@
+{
+ "name": "calceph",
+ "version": "3.5.0",
+ "description": "C library to access the binary planetary ephemeris files.",
+ "homepage": "https://www.imcce.fr/inpop/calceph/",
+ "documentation": "https://www.imcce.fr/content/medias/recherche/equipes/asd/calceph/html/c/index.html",
+ "supports": "!uwp"
+}
diff --git a/versions/baseline.json b/versions/baseline.json
index 11436c8c1..ac64e014d 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -1184,6 +1184,10 @@
"baseline": "1.16.0",
"port-version": 0
},
+ "calceph": {
+ "baseline": "3.5.0",
+ "port-version": 0
+ },
"camport3": {
"baseline": "1.5.3",
"port-version": 1
diff --git a/versions/c-/calceph.json b/versions/c-/calceph.json
new file mode 100644
index 000000000..d415cc1bd
--- /dev/null
+++ b/versions/c-/calceph.json
@@ -0,0 +1,9 @@
+{
+ "versions": [
+ {
+ "git-tree": "d2665db7558ef66aa086f95b155e61b15bd56848",
+ "version": "3.5.0",
+ "port-version": 0
+ }
+ ]
+}