[arch-commits] Commit in fltk/trunk (PKGBUILD)
David Runge
dvzrv at gemini.archlinux.org
Tue Dec 28 16:19:37 UTC 2021
Date: Tuesday, December 28, 2021 @ 16:19:36
Author: dvzrv
Revision: 1085682
upgpkg: fltk 1.3.8-1: Upgrade to 1.3.8.
Drop fltk-examples altogether as it is painful to build and install.
Provide -ffat-lto-objects to CFLAGS and CXXFLAGS so that no static libraries are mangled.
Simplify quoting in file.
Simplify installation of files in split packages.
Modified:
fltk/trunk/PKGBUILD
----------+
PKGBUILD | 110 +++++++++++++++++++++----------------------------------------
1 file changed, 39 insertions(+), 71 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-12-28 16:10:07 UTC (rev 1085681)
+++ PKGBUILD 2021-12-28 16:19:36 UTC (rev 1085682)
@@ -1,99 +1,67 @@
# Maintainer: David Runge <dvzrv at archlinux.org>
pkgbase=fltk
-pkgname=('fltk' 'fltk-docs' 'fltk-examples')
-pkgver=1.3.7
+pkgname=(fltk fltk-docs)
+pkgver=1.3.8
pkgrel=1
pkgdesc="Graphical user interface toolkit for X"
-arch=('x86_64')
-license=('custom' 'LGPL')
+arch=(x86_64)
+license=(custom:FLTK)
url="https://www.fltk.org/"
-makedepends=('alsa-lib' 'cmake' 'doxygen' 'fontconfig' 'libglvnd'
-'libjpeg-turbo' 'libpng' 'mesa' 'libx11' 'libxcursor' 'libxfixes' 'libxft'
-'libxinerama' 'libxrender')
+makedepends=(alsa-lib cmake doxygen fontconfig libglvnd libjpeg-turbo libpng
+mesa libx11 libxcursor libxfixes libxft libxinerama libxrender)
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/${pkgbase}/${pkgbase}/archive/release-${pkgver}.tar.gz")
-sha512sums=('aad131027e88fac3fe73d7e0abfc2602cdc195388f14b29b58d654cb49b780e6ff2ef4270935730b45cd3d366f9e8c8fa3c27a4f17b1f6e8c8fd1f9a0a73c308')
-b2sums=('54934d7992f7bacf7a3561dd252839ea21b279d23559963665e398252ecc85dedea819a7db0572305d7266aec9b38997d89313ba98406ff120013ee8f2096594')
+sha512sums=('197848d3b80a65cca936daf4f0b74609f0fe8332a4cd11af53385fb2aa45ad698b1e239a48732b118cd3cb189bc531711b72fb2eeeb85be887dc6c5a558fa4b3')
+b2sums=('d0a963a38b62ea8cf1d5fe57fab6664fc64083ff41f17847d737f71bfff08578c682deefb9847a9ab5b93210fce2afbfc2020bdfcde714947beac9b3f7c84358')
-prepare() {
- mv -v "${pkgbase}-release-${pkgver}" "${pkgbase}-${pkgver}"
+_pick() {
+ local p="$1" f d; shift
+ for f; do
+ d="$srcdir/$p/${f#$pkgdir/}"
+ mkdir -p "$(dirname "$d")"
+ mv "$f" "$d"
+ rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
+ done
}
build() {
- cd "${pkgbase}-${pkgver}"
- cmake -DCMAKE_INSTALL_PREFIX='/usr' \
- -DFLTK_LIBDIR='/usr/lib' \
- -DCMAKE_BUILD_TYPE='None' \
- -DOPTION_CREATE_LINKS=ON \
- -DOPTION_BUILD_EXAMPLES=OFF \
+ # fat-lto-objects is required for non-mangled .a files in fltk
+ CFLAGS+=" -ffat-lto-objects"
+ CXXFLAGS+=" -ffat-lto-objects"
+
+ cmake -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=None \
+ -DFLTK_LIBDIR=/usr/lib \
-DOPTION_BUILD_SHARED_LIBS=ON \
-DOPTION_BUILD_HTML_DOCUMENTATION=ON \
-DOPTION_INSTALL_HTML_DOCUMENTATION=ON \
-Wno-dev \
-B build \
- -S .
+ -S "${pkgbase}-release-${pkgver}"
make VERBOSE=1 -C build
- make -C build/documentation html
- cmake -DCMAKE_INSTALL_PREFIX='/usr' \
- -DFLTK_LIBDIR='/usr/lib' \
- -DCMAKE_BUILD_TYPE='None' \
- -DOPTION_BUILD_EXAMPLES=ON \
- -Wno-dev \
- -B build-examples \
- -S .
- make VERBOSE=1 -C build-examples
+ make VERBOSE=1 -C build/documentation html
}
package_fltk() {
- depends=('gcc-libs' 'glibc' 'hicolor-icon-theme' 'libfontconfig.so'
- 'libglvnd' 'libjpeg-turbo' 'libpng' 'libx11' 'libxcursor' 'libxext'
- 'libxfixes' 'libxft' 'libxinerama' 'libxrender')
- provides=('libfltk_images.so' 'libfltk_gl.so' 'libfltk_forms.so' 'libfltk.so')
- options=('!docs' 'staticlibs')
+ depends=(gcc-libs glibc hicolor-icon-theme libfontconfig.so
+ libglvnd libjpeg-turbo libpng libx11 libxcursor libxext
+ libxfixes libxft libxinerama libxrender)
+ provides=(libfltk_images.so libfltk_gl.so libfltk_forms.so libfltk.so)
+ options=(!docs staticlibs)
- cd "${pkgbase}-${pkgver}"
- make DESTDIR="${pkgdir}/" install -C build
- install -vDm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}/"
- # removing man pages of examples
+ make VERBOSE=1 DESTDIR="${pkgdir}/" install -C build
+ install -vDm 644 "${pkgbase}-release-${pkgver}"/COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}/"
+ # remove man pages of examples
rm -rvf "${pkgdir}/usr/share/man/man6"
+ (
+ cd "${pkgdir}"
+ _pick fltk-docs usr/share/doc/${pkgname}/html
+ )
}
package_fltk-docs() {
pkgdesc+=" (documentation)"
- cd "${pkgbase}-${pkgver}"
- make DESTDIR="$pkgdir" install -C build/documentation html
- install -vDm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}/"
+ mv -v fltk-docs/* "$pkgdir"
+ install -vDm 644 "${pkgbase}-release-${pkgver}"/COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}
-
-package_fltk-examples() {
- pkgdesc+=" (examples)"
- depends=('gcc-libs' 'glibc' 'hicolor-icon-theme' 'libasound.so'
- 'libfontconfig.so' 'libjpeg-turbo' 'libpng' 'libx11' 'libxcursor' 'libxext'
- 'libxfixes' 'libxft' 'libxinerama' 'libxrender')
- options=('!docs')
-
- cd "${pkgbase}-${pkgver}"
- make DESTDIR="$pkgdir" install -C build-examples
- # example apps and integration files, that are not covered by make install
- for app in {blocks,checkers,sudoku}; do
- install -vDm 755 "build-examples/bin/test/$app" -t "${pkgdir}/usr/bin/"
- install -vDm 644 "test/desktop/$app.desktop" \
- -t "${pkgdir}/usr/share/applications/"
- install -vDm 644 "test/desktop/$app-32.png" \
- "${pkgdir}/usr/share/icons/hicolor/32x32/apps/$app.png"
- install -vDm 644 "test/desktop/$app-128.png" \
- "${pkgdir}/usr/share/icons/hicolor/128x128/apps/$app.png"
- done
- install -vDm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}/"
- # removing any non-examples files
- rm -rfv "${pkgdir}/usr/bin/fltk-config" \
- "${pkgdir}/usr/include" \
- "${pkgdir}/usr/lib" \
- "${pkgdir}/usr/share/applications/fluid.desktop" \
- "${pkgdir}/usr/share/man/man"{1,3} \
- "${pkgdir}/usr/share/fltk" \
- "${pkgdir}/usr/share/icons/hicolor/"{48,64}* \
- "${pkgdir}/usr/share/mime"
- find "${pkgdir}" -type f -iname "*fluid*" -exec rm -rvf {} \;
-}
More information about the arch-commits
mailing list