aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-06-06 14:36:35 -0700
committerGitHub <noreply@github.com>2017-06-06 14:36:35 -0700
commit8167b0682c4961eede00955d80c2cfa098217c25 (patch)
tree7df7b0711faddd4de4a6806b5ae3bd032f73e0fc
parent3a9e4d4844394603c39f2b7e27b12620da775e19 (diff)
parent7be0c32a192e146705775e33c1c3d05c16437b56 (diff)
downloadvcpkg-8167b0682c4961eede00955d80c2cfa098217c25.tar.gz
vcpkg-8167b0682c4961eede00955d80c2cfa098217c25.zip
Merge pull request #1227 from codicodi/add-jasper
[jasper] new port
-rw-r--r--ports/jasper/CONTROL4
-rw-r--r--ports/jasper/portfile.cmake41
2 files changed, 45 insertions, 0 deletions
diff --git a/ports/jasper/CONTROL b/ports/jasper/CONTROL
new file mode 100644
index 000000000..682501e49
--- /dev/null
+++ b/ports/jasper/CONTROL
@@ -0,0 +1,4 @@
+Source: jasper
+Version: 2.0.13
+Description: Open source implementation of the JPEG-2000 Part-1 standard
+Build-Depends: libjpeg-turbo
diff --git a/ports/jasper/portfile.cmake b/ports/jasper/portfile.cmake
new file mode 100644
index 000000000..fa2b415a7
--- /dev/null
+++ b/ports/jasper/portfile.cmake
@@ -0,0 +1,41 @@
+include(vcpkg_common_functions)
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO mdadams/jasper
+ REF version-2.0.13
+ SHA512 8c09a7b773e739a2594cd1002fe66f79ea4336f7de7c97267ab976c06ba075468a7f3c8731dff13a98221cd11d3f2bf8dcddb3fc2c2fc7d7c5ba402bcd3f9fd8
+ HEAD_REF master)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ set(JASPER_LINKAGE -DJAS_ENABLE_SHARED=OFF)
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=OFF
+ -DJAS_ENABLE_LIBJPEG=ON
+ -DJAS_ENABLE_OPENGL=OFF # not needed for the library
+ -DJAS_ENABLE_DOC=OFF
+ ${JASPER_LINKAGE})
+
+vcpkg_install_cmake()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
+else()
+ file(GLOB EXECS ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
+ file(REMOVE ${EXECS})
+endif()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+vcpkg_copy_pdbs()
+
+file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jasper)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/jasper/LICENSE ${CURRENT_PACKAGES_DIR}/share/jasper/copyright)