47 lines
1.1 KiB
Plaintext
47 lines
1.1 KiB
Plaintext
# Description: Codec JPEG-2000 Part-1 standard.
|
|
# URL: https://www.ece.uvic.ca/~frodo/jasper/
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
# Depends on: freeglut libjpeg-turbo xorg-libxmu
|
|
|
|
name=jasper
|
|
version=2.0.22
|
|
release=1
|
|
source=(https://github.com/jasper-software/jasper/archive/version-$version/$name-$version.tar.gz
|
|
jasper-1.900.1-fix-filename-buffer-overflow.patch)
|
|
|
|
build() {
|
|
cd $name-version-$version
|
|
|
|
patch -p1 -i $SRC/jasper-1.900.1-fix-filename-buffer-overflow.patch
|
|
sed -r 's|(CMAKE_SKIP_BUILD_RPATH) FALSE|\1 TRUE|g' -i CMakeLists.txt
|
|
|
|
mkdir -p build-{shared,static}
|
|
|
|
local config="
|
|
-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
|
|
-DOpenGL_GL_PREFERENCE=GLVND"
|
|
|
|
#build static lib
|
|
(cd build-static
|
|
cmake .. $config -DJAS_ENABLE_SHARED=OFF
|
|
make
|
|
)
|
|
|
|
#build shared lib
|
|
(cd build-shared
|
|
cmake .. $config -DJAS_ENABLE_SHARED=ON
|
|
make
|
|
)
|
|
|
|
make -C build-static DESTDIR=$PKG install
|
|
make -C build-shared DESTDIR=$PKG install
|
|
|
|
rm -r $PKG/usr/share/doc
|
|
}
|