diff options
author | David Seifert <soap@gentoo.org> | 2016-11-27 11:21:34 +0100 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2016-11-27 11:24:13 +0100 |
commit | 2d999e4fab11e650d00119c5ecb65587bb44c806 (patch) | |
tree | 8ac007b47c53d4a4300dad4d311447c96d709fa7 /media-libs/jasper | |
parent | media-libs/libmms: clean vulnerable versions wrt security bug #507822 (diff) | |
download | gentoo-2d999e4fab11e650d00119c5ecb65587bb44c806.tar.gz gentoo-2d999e4fab11e650d00119c5ecb65587bb44c806.tar.bz2 gentoo-2d999e4fab11e650d00119c5ecb65587bb44c806.zip |
media-libs/jasper: Version bump to 2.0.0
Package-Manager: portage-2.3.2
Diffstat (limited to 'media-libs/jasper')
-rw-r--r-- | media-libs/jasper/Manifest | 1 | ||||
-rw-r--r-- | media-libs/jasper/files/jasper-2.0.0-fix-build-system.patch | 92 | ||||
-rw-r--r-- | media-libs/jasper/jasper-2.0.0.ebuild | 63 |
3 files changed, 156 insertions, 0 deletions
diff --git a/media-libs/jasper/Manifest b/media-libs/jasper/Manifest index d1f793977e29..e809c729b667 100644 --- a/media-libs/jasper/Manifest +++ b/media-libs/jasper/Manifest @@ -1,2 +1,3 @@ DIST jasper-1.900.26.tar.gz 1289435 SHA256 b27e14639b0cbd5362fcf537660a1294c4c183539c20767d3b75df60b02ffd1a SHA512 977df6f79175854cc750224ed136022d66b543bae3d4b0a5cfee61e57d2723e221ee0b784bdfbcc8bd95a4ec7afdc35ad47bc0cc6f8fbbf39b715790815878fd WHIRLPOOL 24e99cb400aa2e21a0bdf576768cebb0d5563aa003da2a46186ad27fb2c7b268995351cbe76b1a059024e51fa339872d8ac0ccc450466c6fc06a4ba840369ee1 DIST jasper-1.900.6.tar.gz 787271 SHA256 5d0b4d684d19104b4564ef7142f4059eda91902620af36a3a6205d3dae66e027 SHA512 096e77609bf977eb0bbc9b1fc804bce7be1c7c81d066db7e367b61c4f6fa772a7a7ef21f7613485de46c3ca22cce57dce1e80c3736f54eb77eb44153218983b6 WHIRLPOOL 23edd5abc05248b43085f5a77a0210dcaf52089c57e31686478bd9b01284f294459ac1cad71eae4a594ef2632ba4323190b25d1a37dd36af0c0d7cd69579e568 +DIST jasper-2.0.0.tar.gz 1306305 SHA256 37fb86fbdc880e8ee566cf2ac226f0bfe259394914fad4d9e26bbe0764f8c378 SHA512 1b216e6cfe49155a3f416a0411523e48e7dffcf84688e2c4e7cabbe30585e6c50b9c865930fe3c4aec472ff01697e77d3c02e97f2bb4c72d35d1509ae9916ddd WHIRLPOOL e64929dfe3d679975a8404a63c4b3a28b72d6601c4e05e05228df1893578eff96c38135bc46f13b9e2c306011533bb3ef062d356ddea4b91dfeed93cc25f045a diff --git a/media-libs/jasper/files/jasper-2.0.0-fix-build-system.patch b/media-libs/jasper/files/jasper-2.0.0-fix-build-system.patch new file mode 100644 index 000000000000..bae54760f470 --- /dev/null +++ b/media-libs/jasper/files/jasper-2.0.0-fix-build-system.patch @@ -0,0 +1,92 @@ +* Fix build system to honour Gentoo's multilib-strict (lib32/lib64) +* jiv also requires OpenGL libs, not just GLUT +* Only look for OpenGL+GLUT if JAS_ENABLE_OPENGL is actually on + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -65,6 +65,7 @@ + option(JAS_ENABLE_OPENGL "Enable use of OpenGL Library" true) + option(JAS_ENABLE_STRICT "Enable pedantic error checking" false) + option(JAS_ENABLE_SHARED "Enable building of shared library" true) ++option(CMAKE_INSTALL_LIBDIR "Path to install libraries into" lib) + + if (APPLE AND ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + set(MACOSX true) +@@ -173,21 +174,18 @@ + # set(JPEG_INCLUDE_DIR "") + #endif() + +-find_package(GLUT) +-if(GLUT_FOUND) +- include_directories("${GLUT_INCLUDE_DIR}") +-endif() +-check_include_files(GL/glut.h JAS_HAVE_GL_GLUT_H) +-message("GLUT library found: ${GLUT_FOUND}") +-message("GLUT libraries: ${GLUT_LIBRARIES}") +-message("GLUT include directory: ${GLUT_INCLUDE_DIR}") +-message("JAS_ENABLE_OPENGL: ${JAS_ENABLE_OPENGL}") +-message("JAS_HAVE_GL_GLUT_H: ${JAS_HAVE_GL_GLUT_H}") +-if(GLUT_FOUND AND (NOT JAS_HAVE_GL_GLUT_H OR NOT JAS_ENABLE_OPENGL)) +- message("disabling GLUT") +- set(GLUT_FOUND false) +- set(GLUT_LIBRARIES "") +- set(GLUT_INCLUDE_DIR "") ++if(JAS_ENABLE_OPENGL) ++ find_package(OpenGL REQUIRED) ++ find_package(GLUT REQUIRED) ++ ++ check_include_files(GL/glut.h JAS_HAVE_GL_GLUT_H) ++ message("GLUT library found: ${GLUT_FOUND}") ++ message("GLUT libraries: ${GLUT_LIBRARIES}") ++ message("GLUT include directory: ${GLUT_INCLUDE_DIR}") ++ message("JAS_HAVE_GL_GLUT_H: ${JAS_HAVE_GL_GLUT_H}") ++ if(NOT JAS_HAVE_GL_GLUT_H) ++ message(FATAL_ERROR "GL/glut.h cannot be found or is not working.") ++ endif() + endif() + + if(UNIX) +@@ -219,7 +217,7 @@ + # the RPATH to be used when installing, but only if it's not a system directory + LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) + IF("${isSystemDir}" STREQUAL "-1") +- SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") ++ SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") + ENDIF("${isSystemDir}" STREQUAL "-1") + + ################################################################################ +@@ -275,7 +273,7 @@ + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/build/jasper.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/build/jasper.pc @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/build/jasper.pc +- DESTINATION lib/pkgconfig) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/build/jasper.spec.in + ${CMAKE_CURRENT_BINARY_DIR}/build/jasper.spec @ONLY) +--- a/src/appl/CMakeLists.txt ++++ b/src/appl/CMakeLists.txt +@@ -22,7 +22,7 @@ + # The jiv program (which requires GLUT) + if(GLUT_FOUND) + add_executable(jiv jiv.c) +- target_link_libraries(jiv libjasper ${JPEG_LIBRARIES} ${GLUT_LIBRARIES} ${MATH_LIBRARY}) ++ target_link_libraries(jiv libjasper ${JPEG_LIBRARIES} ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${MATH_LIBRARY}) + set(programs "${programs}" jiv) + set(man_pages "${man_pages}" jiv.1) + else() +@@ -33,4 +33,4 @@ + install(TARGETS ${programs} DESTINATION bin) + + # Install the manual pages for the programs that were built. +-install(FILES ${man_pages} DESTINATION man) ++install(FILES ${man_pages} DESTINATION share/man/man1) +--- a/src/libjasper/CMakeLists.txt ++++ b/src/libjasper/CMakeLists.txt +@@ -151,5 +151,5 @@ + # MacOSX does cannot build a shared library without this line. + target_link_libraries(libjasper ${JPEG_LIBRARIES}) + +-install(TARGETS libjasper DESTINATION lib) ++install(TARGETS libjasper DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install(FILES ${libjasper_headers} DESTINATION include/jasper) diff --git a/media-libs/jasper/jasper-2.0.0.ebuild b/media-libs/jasper/jasper-2.0.0.ebuild new file mode 100644 index 000000000000..199e8dcb487e --- /dev/null +++ b/media-libs/jasper/jasper-2.0.0.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit cmake-multilib + +DESCRIPTION="Implementation of the codec specified in the JPEG-2000 Part-1 standard" +HOMEPAGE="http://www.ece.uvic.ca/~mdadams/jasper/" + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/mdadams/jasper.git" +else + inherit vcs-snapshot + SRC_URI="https://github.com/mdadams/${PN}/archive/version-${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 \ + ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux \ + ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" +fi + +# We limit memory usage to 128 MiB by default, specified in bytes +: ${JASPER_MEM_LIMIT:=134217728} + +LICENSE="JasPer2.0" +SLOT="0/4" +IUSE="jpeg opengl" + +RDEPEND=" + jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] ) + opengl? ( + >=virtual/opengl-7.0-r1:0[${MULTILIB_USEDEP}] + >=media-libs/freeglut-2.8.1:0[${MULTILIB_USEDEP}] + virtual/glu + )" +DEPEND="${RDEPEND} + app-arch/unzip" + +PATCHES=( + "${FILESDIR}"/${PN}-2.0.0-fix-build-system.patch +) + +multilib_src_configure() { + local mycmakeargs=( + -DALLOW_IN_SOURCE_BUILD=OFF + -DBASH_PROGRAM="${EPREFIX}"/bin/bash + -DJAS_ENABLE_ASAN=OFF + -DJAS_ENABLE_LIBJPEG=$(usex jpeg) + -DJAS_ENABLE_LSAN=OFF + -DJAS_ENABLE_MSAN=OFF + -DJAS_ENABLE_OPENGL=$(usex opengl) + -DJAS_ENABLE_SHARED=ON + -DJAS_ENABLE_STRICT=ON + -DJAS_ENABLE_USAN=OFF + ) + cmake-utils_src_configure +} + +multilib_src_install_all() { + einstalldocs + dodoc -r doc/{jasper,jpeg2000}.pdf +} |