[arch-commits] Commit in jasper/repos/extra-x86_64 (5 files)

Antonio Rojas arojas at gemini.archlinux.org
Sun Apr 24 11:38:14 UTC 2022


    Date: Sunday, April 24, 2022 @ 11:38:14
  Author: arojas
Revision: 443897

archrelease: copy trunk to extra-x86_64

Added:
  jasper/repos/extra-x86_64/PKGBUILD
    (from rev 443896, jasper/trunk/PKGBUILD)
  jasper/repos/extra-x86_64/fix-opengl-linking.patch
    (from rev 443896, jasper/trunk/fix-opengl-linking.patch)
  jasper/repos/extra-x86_64/jasper-1.900.1-fix-filename-buffer-overflow.patch
    (from rev 443896, jasper/trunk/jasper-1.900.1-fix-filename-buffer-overflow.patch)
Deleted:
  jasper/repos/extra-x86_64/PKGBUILD
  jasper/repos/extra-x86_64/jasper-1.900.1-fix-filename-buffer-overflow.patch

---------------------------------------------------+
 PKGBUILD                                          |  167 ++++++++++----------
 fix-opengl-linking.patch                          |   85 ++++++++++
 jasper-1.900.1-fix-filename-buffer-overflow.patch |   74 ++++----
 3 files changed, 207 insertions(+), 119 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2022-04-24 11:37:57 UTC (rev 443896)
+++ PKGBUILD	2022-04-24 11:38:14 UTC (rev 443897)
@@ -1,82 +0,0 @@
-# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
-# Maintainer: Eric Bélanger <eric at archlinux.org>
-
-pkgbase=jasper
-pkgname=('jasper' 'jasper-doc')
-pkgver=2.0.33
-pkgrel=1
-pkgdesc='Software-based implementation of the codec specified in the emerging JPEG-2000 Part-1 standard'
-url='https://www.ece.uvic.ca/~mdadams/jasper/'
-arch=('x86_64')
-license=('custom:JasPer2.0')
-makedepends=('glibc' 'libjpeg' 'freeglut' 'libxmu' 'glu' 'cmake' 'doxygen')
-options=('staticlibs')
-source=(${pkgname}-${pkgver}.tar.gz::https://github.com/mdadams/jasper/archive/version-${pkgver}.tar.gz
-        jasper-1.900.1-fix-filename-buffer-overflow.patch)
-sha512sums=('ff88c4b55d52803786520e4f0db10f7cb7cd7642694c866ea7859bc79e409590469fc2c63afe522c7f8b0c00062c155c0fe3b83b8928e319173a3ec9fea3e09e'
-            'b8d798bf75523c5db263783e42c653dd0cb03deee90be32eddf878bb6893cca02abadd94de6a8c737a5b7fe76f7fb245979f010765e6a95fc520b215e3a2a7f0')
-b2sums=('29cd29cf1af285f6054a969991674b12c968b42d70970a1a460fe43e25047b56d2b96a614d0723d9def6c09c9c6b1bdb04289bdcd8cf348449271e5c975074db'
-        '9b1927a437ed9b32491f07a210600b5a7d10711ec954dadc030a8238b67e9c6d1a8e67956fd7a5515e7060f0a1651fa86763e21d6d20592f8f00e9d3260722a1')
-
-prepare() {
-  cd ${pkgbase}-version-${pkgver}
-  patch -p1 < "${srcdir}/jasper-1.900.1-fix-filename-buffer-overflow.patch"
-  sed -r 's|(CMAKE_SKIP_BUILD_RPATH) FALSE|\1 TRUE|g' -i CMakeLists.txt
-}
-
-build() {
-  cd ${pkgbase}-version-${pkgver}
-
-  local options=(
-    -DCMAKE_INSTALL_PREFIX=/usr
-    -DCMAKE_INSTALL_LIBDIR=lib
-    -DCMAKE_BUILD_TYPE=Release
-    -DJAS_ENABLE_OPENGL=ON
-    -DJAS_ENABLE_LIBJPEG=ON
-    -DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=OFF
-    -DCMAKE_SKIP_RPATH=ON
-  )
-
-  echo "Building static lib..."
-  cmake \
-    -B build-static \
-    "${options[@]}" \
-    -DJAS_ENABLE_SHARED=OFF
-  make -C build-static
-
-  echo "Building shared lib..."
-  cmake \
-    -B build-shared \
-    "${options[@]}" \
-    -DJAS_ENABLE_SHARED=ON
-  make -C build-shared
-}
-
-check() {
-  cd ${pkgbase}-version-${pkgver}/build-static
-  make -j1 test
-}
-
-package_jasper() {
-  depends=('glibc' 'libjpeg' 'libjpeg.so')
-  optdepends=('jasper-doc: documentation'
-              'freeglut: jiv support'
-              'glu: jiv support')
-  provides=('libjasper.so')
-  cd ${pkgbase}-version-${pkgver}
-  make -C build-static DESTDIR="${pkgdir}" install
-  make -C build-shared DESTDIR="${pkgdir}" install
-  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
-  rm -r "${pkgdir}/usr/share/doc"
-}
-
-package_jasper-doc() {
-  pkgdesc+=' (documentation)'
-  optdepends=('jasper')
-  cd ${pkgbase}-version-${pkgver}
-  make -C build-shared DESTDIR="${pkgdir}" install
-  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
-  rm -rf "${pkgdir}/usr/"{bin,include,lib,share/man}
-}
-
-# vim: ts=2 sw=2 et:

Copied: jasper/repos/extra-x86_64/PKGBUILD (from rev 443896, jasper/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2022-04-24 11:38:14 UTC (rev 443897)
@@ -0,0 +1,85 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Maintainer: Eric Bélanger <eric at archlinux.org>
+
+pkgbase=jasper
+pkgname=('jasper' 'jasper-doc')
+pkgver=2.0.33
+pkgrel=2
+pkgdesc='Software-based implementation of the codec specified in the emerging JPEG-2000 Part-1 standard'
+url='https://www.ece.uvic.ca/~mdadams/jasper/'
+arch=('x86_64')
+license=('custom:JasPer2.0')
+makedepends=('glibc' 'libjpeg' 'freeglut' 'libxmu' 'glu' 'cmake' 'doxygen')
+options=('staticlibs')
+source=(${pkgname}-${pkgver}.tar.gz::https://github.com/mdadams/jasper/archive/version-${pkgver}.tar.gz
+        jasper-1.900.1-fix-filename-buffer-overflow.patch
+        fix-opengl-linking.patch)
+sha512sums=('ff88c4b55d52803786520e4f0db10f7cb7cd7642694c866ea7859bc79e409590469fc2c63afe522c7f8b0c00062c155c0fe3b83b8928e319173a3ec9fea3e09e'
+            'b8d798bf75523c5db263783e42c653dd0cb03deee90be32eddf878bb6893cca02abadd94de6a8c737a5b7fe76f7fb245979f010765e6a95fc520b215e3a2a7f0'
+            'e59788285d5def5391eabe07ed934fd2839357c81edf8f016a4a99b935a8ab0d8b54a82071586b3f79125b7317e01bad8d9c678ad808f2b09710d33a29a1b8f1')
+b2sums=('29cd29cf1af285f6054a969991674b12c968b42d70970a1a460fe43e25047b56d2b96a614d0723d9def6c09c9c6b1bdb04289bdcd8cf348449271e5c975074db'
+        '9b1927a437ed9b32491f07a210600b5a7d10711ec954dadc030a8238b67e9c6d1a8e67956fd7a5515e7060f0a1651fa86763e21d6d20592f8f00e9d3260722a1'
+        'f459a8891fae03236bc17695655b2a1e05cdc4456e644c2deb219d82e24472d816b93b44e3cbe73403a82736bb5b36becd2076402341eb0a1c7362aace58f915')
+
+prepare() {
+  cd ${pkgbase}-version-${pkgver}
+  patch -p1 < "${srcdir}/jasper-1.900.1-fix-filename-buffer-overflow.patch"
+  sed -r 's|(CMAKE_SKIP_BUILD_RPATH) FALSE|\1 TRUE|g' -i CMakeLists.txt
+  patch -p1 < ../fix-opengl-linking.patch # Fix linking to OpenGL libraries
+}
+
+build() {
+  cd ${pkgbase}-version-${pkgver}
+
+  local options=(
+    -DCMAKE_INSTALL_PREFIX=/usr
+    -DCMAKE_C_FLAGS="$CFLAGS -ffat-lto-objects"
+    -DJAS_ENABLE_OPENGL=ON
+    -DJAS_ENABLE_LIBJPEG=ON
+    -DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=OFF
+    -DCMAKE_SKIP_RPATH=ON
+  )
+
+  echo "Building static lib..."
+  cmake \
+    -B build-static \
+    "${options[@]}" \
+    -DJAS_ENABLE_SHARED=OFF
+  make -C build-static
+
+  echo "Building shared lib..."
+  cmake \
+    -B build-shared \
+    "${options[@]}" \
+    -DJAS_ENABLE_SHARED=ON
+  make -C build-shared
+}
+
+check() {
+  cd ${pkgbase}-version-${pkgver}/build-static
+  make -j1 test
+}
+
+package_jasper() {
+  depends=('glibc' 'libjpeg' 'libjpeg.so')
+  optdepends=('jasper-doc: documentation'
+              'freeglut: jiv support'
+              'glu: jiv support')
+  provides=('libjasper.so')
+  cd ${pkgbase}-version-${pkgver}
+  make -C build-static DESTDIR="${pkgdir}" install
+  make -C build-shared DESTDIR="${pkgdir}" install
+  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  rm -r "${pkgdir}/usr/share/doc"
+}
+
+package_jasper-doc() {
+  pkgdesc+=' (documentation)'
+  optdepends=('jasper')
+  cd ${pkgbase}-version-${pkgver}
+  make -C build-shared DESTDIR="${pkgdir}" install
+  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  rm -rf "${pkgdir}/usr/"{bin,include,lib,share/man}
+}
+
+# vim: ts=2 sw=2 et:

Copied: jasper/repos/extra-x86_64/fix-opengl-linking.patch (from rev 443896, jasper/trunk/fix-opengl-linking.patch)
===================================================================
--- fix-opengl-linking.patch	                        (rev 0)
+++ fix-opengl-linking.patch	2022-04-24 11:38:14 UTC (rev 443897)
@@ -0,0 +1,85 @@
+diff --git a/build/cmake/modules/JasOpenGL.cmake b/build/cmake/modules/JasOpenGL.cmake
+index b58b8de..4e58ead 100644
+--- a/build/cmake/modules/JasOpenGL.cmake
++++ b/build/cmake/modules/JasOpenGL.cmake
+@@ -5,50 +5,28 @@
+ if (JAS_ENABLE_OPENGL)
+ 	set(OpenGL_GL_PREFERENCE GLVND)
+ 	find_package(OpenGL ${JAS_REQUIRED})
+-	message("OpenGL library found: ${OPENGL_FOUND}")
+-else()
+-	set(OPENGL_FOUND false)
+-endif()
+-if (JAS_ENABLE_OPENGL AND OPENGL_FOUND)
+-	set(JAS_HAVE_OPENGL 0)
+-	message("OpenGL include directory: ${OPENGL_INCLUDE_DIR}")
+-	message("OpenGL libraries: ${OPENGL_LIBRARIES}")
++	if (TARGET OpenGL::GL)
++		message("OpenGL library found: ${OPENGL_FOUND}")
++		message("OpenGL include directory: ${OPENGL_INCLUDE_DIR}")
++		message("OpenGL libraries: ${OPENGL_LIBRARIES}")
++	endif()
+ 	find_package(GLUT ${JAS_REQUIRED})
+-	message("GLUT library found: ${GLUT_FOUND}")
+-	if (GLUT_FOUND)
++	if (TARGET GLUT::GLUT)
+ 		message("GLUT include directory: ${GLUT_INCLUDE_DIR}")
+ 		message("GLUT libraries: ${GLUT_LIBRARIES}")
+-		set(CMAKE_REQUIRED_INCLUDES ${GLUT_INCLUDE_DIR})
++	endif()
++	if((TARGET OpenGL::GL) AND (TARGET GLUT::GLUT))
+ 		check_include_files(GL/glut.h JAS_HAVE_GL_GLUT_H)
+ 		check_include_files(glut.h JAS_HAVE_GLUT_H)
+ 		if (JAS_HAVE_GL_GLUT_H OR JAS_HAVE_GLUT_H)
++			set(JAS_OPENGL_TARGETS GLUT::GLUT OpenGL::GL)
++			if (TARGET OpenGL::GLU)
++				set(JAS_OPENGL_TARGETS ${JAS_OPENGL_TARGETS} OpenGL::GLU)
++			endif()
+ 			set(JAS_HAVE_OPENGL 1)
+-			include_directories(${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
+ 		else()
+ 			message(WARNING "The header files GL/glut.h and glut.h both appear to be missing.")
+ 			message(WARNING "Disabling OpenGL.")
+ 		endif()
+ 	endif()
+-	# On some systems (e.g., Fedora 21), there is a bug in the cmake code
+-	# that detects GLUT libraries.  The following ugliness is a workaround for 
+-	# this problem.
+-	if (NOT GLUT_Xmu_LIBRARY OR NOT GLUT_Xmi_LIBRARY)
+-		if (NOT GLUT_Xmu_LIBRARY)
+-			set(GLUT_Xmu_LIBRARY "")
+-			message(WARNING "Clearing bogus value for GLUT_Xmu_LIBRARY.")
+-			message(WARNING "Your version of CMake may be buggy.")
+-		endif()
+-		if (NOT GLUT_Xmi_LIBRARY)
+-			set(GLUT_Xmi_LIBRARY "")
+-			message(WARNING "Clearing bogus value for GLUT_Xmi_LIBRARY.")
+-			message(WARNING "Your version of CMake may be buggy.")
+-		endif()
+-		set(GLUT_LIBRARIES "${GLUT_glut_LIBRARY}")
+-	endif()
+-else()
+-	set(JAS_HAVE_OPENGL 0)
+-	set(OPENGL_INCLUDE_DIR "")
+-	set(OPENGL_LIBRARIES "")
+-	set(GLUT_INCLUDE_DIR "")
+-	set(GLUT_LIBRARIES "")
+ endif()
+diff --git a/src/appl/CMakeLists.txt b/src/appl/CMakeLists.txt
+index 1b865de..3d0c57b 100644
+--- a/src/appl/CMakeLists.txt
++++ b/src/appl/CMakeLists.txt
+@@ -22,10 +22,9 @@ set(man_pages "${man_pages}" imgcmp.1)
+ # The jiv program (which requires GLUT)
+ if(JAS_HAVE_OPENGL)
+ 	add_executable(jiv jiv.c)
+-	target_include_directories(jiv PUBLIC
+-	  ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
+-	target_link_libraries(jiv libjasper ${JPEG_LIBRARIES} ${GLUT_LIBRARIES}
+-	  ${OPENGL_LIBRARIES} ${MATH_LIBRARY})
++	target_link_libraries(jiv libjasper
++	  ${JPEG_LIBRARIES} ${HEIF_LIBRARIES} ${JAS_OPENGL_TARGETS}
++	  ${JAS_OPENGL_TARGETS} ${MATH_LIBRARY} ${THREAD_LIBRARY})
+ 	set(programs "${programs}" jiv)
+ 	set(man_pages "${man_pages}" jiv.1)
+ else()

Deleted: jasper-1.900.1-fix-filename-buffer-overflow.patch
===================================================================
--- jasper-1.900.1-fix-filename-buffer-overflow.patch	2022-04-24 11:37:57 UTC (rev 443896)
+++ jasper-1.900.1-fix-filename-buffer-overflow.patch	2022-04-24 11:38:14 UTC (rev 443897)
@@ -1,37 +0,0 @@
-Description: Filename buffer overflow fix
- This patch fixes a security hole by a bad buffer size handling.
-Author: Roland Stigge <stigge at antcom.de>
-Bug-Debian: http://bugs.debian.org/645118
-
---- a/src/libjasper/include/jasper/jas_stream.h
-+++ b/src/libjasper/include/jasper/jas_stream.h
-@@ -77,6 +77,7 @@
- #include <jasper/jas_config.h>
- 
- #include <stdio.h>
-+#include <limits.h>
- #if defined(JAS_HAVE_FCNTL_H)
- #include <fcntl.h>
- #endif
-@@ -99,6 +100,12 @@ extern "C" {
- #define O_BINARY	0
- #endif
- 
-+#ifdef PATH_MAX
-+#define JAS_PATH_MAX PATH_MAX
-+#else
-+#define JAS_PATH_MAX 4096
-+#endif
-+
- /*
-  * Stream open flags.
-  */
-@@ -251,7 +258,7 @@ typedef struct {
- typedef struct {
- 	int fd;
- 	int flags;
--	char pathname[L_tmpnam + 1];
-+	char pathname[JAS_PATH_MAX + 1];
- } jas_stream_fileobj_t;
- 
- #define	JAS_STREAM_FILEOBJ_DELONCLOSE	0x01

Copied: jasper/repos/extra-x86_64/jasper-1.900.1-fix-filename-buffer-overflow.patch (from rev 443896, jasper/trunk/jasper-1.900.1-fix-filename-buffer-overflow.patch)
===================================================================
--- jasper-1.900.1-fix-filename-buffer-overflow.patch	                        (rev 0)
+++ jasper-1.900.1-fix-filename-buffer-overflow.patch	2022-04-24 11:38:14 UTC (rev 443897)
@@ -0,0 +1,37 @@
+Description: Filename buffer overflow fix
+ This patch fixes a security hole by a bad buffer size handling.
+Author: Roland Stigge <stigge at antcom.de>
+Bug-Debian: http://bugs.debian.org/645118
+
+--- a/src/libjasper/include/jasper/jas_stream.h
++++ b/src/libjasper/include/jasper/jas_stream.h
+@@ -77,6 +77,7 @@
+ #include <jasper/jas_config.h>
+ 
+ #include <stdio.h>
++#include <limits.h>
+ #if defined(JAS_HAVE_FCNTL_H)
+ #include <fcntl.h>
+ #endif
+@@ -99,6 +100,12 @@ extern "C" {
+ #define O_BINARY	0
+ #endif
+ 
++#ifdef PATH_MAX
++#define JAS_PATH_MAX PATH_MAX
++#else
++#define JAS_PATH_MAX 4096
++#endif
++
+ /*
+  * Stream open flags.
+  */
+@@ -251,7 +258,7 @@ typedef struct {
+ typedef struct {
+ 	int fd;
+ 	int flags;
+-	char pathname[L_tmpnam + 1];
++	char pathname[JAS_PATH_MAX + 1];
+ } jas_stream_fileobj_t;
+ 
+ #define	JAS_STREAM_FILEOBJ_DELONCLOSE	0x01



More information about the arch-commits mailing list