|
| 1 | +# Template file for 'nx-libs' |
| 2 | +pkgname=nx-libs |
| 3 | +version=3.5.99.26 |
| 4 | +revision=1 |
| 5 | +build_style=gnu-configure |
| 6 | +make_build_args="CONFIGURE=echo IMAKE_DEFINES=-DUseTIRPC=YES" |
| 7 | +make_install_args="PREFIX=/usr" |
| 8 | +hostmakedepends="autoconf automake libtool pkg-config which imake xkbcomp gccmakedep" |
| 9 | +makedepends="xorgproto zlib-devel libjpeg-turbo-devel libpng-devel |
| 10 | + libXext-devel libXdamage-devel libXrandr-devel libXtst-devel pixman-devel |
| 11 | + libXfont2-devel libxml2-devel libXcomposite-devel libXinerama-devel |
| 12 | + libtirpc-devel libXpm-devel font-util xkbcomp" |
| 13 | +short_desc="NX X11 protocol compression libraries" |
| 14 | +maintainer="eoli3n <jkirsz@gmail.com>" |
| 15 | +license="GPL-2.0-or-later" |
| 16 | +homepage="https://github.com/ArcticaProject/nx-libs" |
| 17 | +distfiles="https://github.com/ArcticaProject/nx-libs/archive/$version/$pkgname-$version.tar.gz" |
| 18 | +checksum=3ce7ca4e6b57b3a2d7588b2d0f4009036d2566a8925ca2c62f08a8dc0df50357 |
| 19 | +python_version=3 |
| 20 | +nocross="imake attempts to run target executables on host" |
| 21 | + |
| 22 | +post_patch() { |
| 23 | + # Replace hard-coded /usr/local ProjectRoot |
| 24 | + vsed -e '/ProjectRoot/s,/usr/local,/usr,' -i nx-X11/config/cf/site.def |
| 25 | + # Manually run autoreconf in pre_configure, disable in Makefile |
| 26 | + vsed -e 's/autoreconf/echo &-disabled/' -i Makefile |
| 27 | +} |
| 28 | + |
| 29 | +pre_configure() { |
| 30 | + # Create configure scripts for all subprojects |
| 31 | + local _subdir |
| 32 | + for _subdir in nxcomp nx-X11/lib nxcompshad nxproxy nxdialog; do |
| 33 | + ( cd ${_subdir} && autoreconf -vfsi ) |
| 34 | + done |
| 35 | +} |
| 36 | + |
| 37 | +do_configure() { |
| 38 | + # Configure all subprojects in advance of build |
| 39 | + local _subdir |
| 40 | + for _subdir in nxcomp nxcompshad nxproxy nxdialog; do |
| 41 | + ( cd ${_subdir} && ./configure ${configure_args} ) |
| 42 | + done |
| 43 | + |
| 44 | + # nx-X11 configure has an extra argument |
| 45 | + ( cd nx-X11/lib && ./configure ${configure_args} --disable-poll ) |
| 46 | +} |
| 47 | + |
| 48 | +post_install() { |
| 49 | + # Remove conflicting GL headers |
| 50 | + rm -rf ${DESTDIR}/usr/include/GL |
| 51 | +} |
| 52 | + |
| 53 | +nx-libs-devel_install() { |
| 54 | + depends="${sourcepkg}>=${version}_${revision}" |
| 55 | + short_desc+=" - development files" |
| 56 | + pkg_install() { |
| 57 | + vmove usr/include |
| 58 | + vmove "usr/lib/*.a" |
| 59 | + vmove "usr/lib/*.so" |
| 60 | + vmove usr/lib/pkgconfig |
| 61 | + } |
| 62 | +} |
0 commit comments