-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathlibpng.sh
More file actions
39 lines (38 loc) · 1.14 KB
/
libpng.sh
File metadata and controls
39 lines (38 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package: libpng
version: v1.6.47
requires:
- zlib
build_requires:
- CMake
- ninja
- alibuild-recipe-tools
source: https://github.com/pnggroup/libpng
prefer_system: (?!slc5)
prefer_system_check: |
#!/bin/bash -e
# shellcheck disable=SC2046
if ! printf "#include <png.h>\n" |
c++ -xc++ - $(libpng-config --cflags) -c -M 2>&1; then
printf "%s\n" \
"libpng was not found." \
" * RHEL-compatible: libpng libpng-devel" \
" * Ubuntu-compatible: libpng12-0 libpng12-dev"
exit 1
fi
---
#!/bin/bash -ex
cmake ${SOURCEDIR} \
-G Ninja \
-DCMAKE_INSTALL_PREFIX:PATH=$INSTALLROOT \
-DCMAKE_CXX_STANDARD=${CXXSTD} \
-DBUILD_SHARED_LIBS=YES \
${ZLIB_ROOT:+-DZLIB_ROOT:PATH=$ZLIB_ROOT} \
-DCMAKE_SKIP_RPATH=YES \
-DSKIP_INSTALL_FILES=1 \
-DCMAKE_INSTALL_LIBDIR=lib
cmake --build . -- ${JOBS:+-j$JOBS} install
# Modulefile
MODULEDIR="$INSTALLROOT/etc/modulefiles"
MODULEFILE="$MODULEDIR/$PKGNAME"
mkdir -p "$MODULEDIR"
alibuild-generate-module --bin --lib > $MODULEFILE