aboutsummaryrefslogblamecommitdiffstats
path: root/main/poppler/APKBUILD
blob: a2789fdb37f69288fc512038e6975fa2f302c17a (plain) (tree)
1
2
3
4
5
6
7
8
9

                                                   
             
        
                                                 
                                      
          
                                  
                          
                                




                                                                    
                                                               
                                         
 



                     
           

                                                                                
                            







                                                                                             

 
         
                      
 


                                             

                                                      
                                



            

                                      

 



                                                                 

 

                                          
                              


                                                   
                                     





                                                  
                                     

 
                                                                                                                                                                    
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=poppler
pkgver=0.82.0
pkgrel=1
pkgdesc="PDF rendering library based on xpdf 3.0"
url="https://poppler.freedesktop.org/"
arch="all"
options="!check"  # No test suite.
license="GPL-2.0-or-later"
depends_dev="cairo-dev glib-dev"
makedepends="$depends_dev cmake fontconfig-dev
	gobject-introspection-dev lcms2-dev libjpeg-turbo-dev
	libpng-dev libxml2-dev openjpeg-dev openjpeg-tools
	tiff-dev zlib-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-glib $pkgname-utils"
source="https://poppler.freedesktop.org/poppler-$pkgver.tar.xz"
builddir="$srcdir/$pkgname-$pkgver/build"

# secfixes:
#   0.80.0-r0:
#     - CVE-2019-9959

prepare() {
	local _linked_pkg=poppler-qt5
	local _linked_apkbuild="$startdir"/../../community/$_linked_pkg/APKBUILD
	mkdir -p "$builddir"
	cd "$builddir"
	if  [ -f "$_linked_apkbuild" ]; then
		local _linked_ver=$( . "$_linked_apkbuild"; echo "$pkgver")
		if [ "$_linked_ver" != "$pkgver" ]; then
			error "pkgver needs to be identical with $_linked_pkg ($_linked_ver)"
			return 1
		fi
	fi
}

build() {
	cd "$builddir"

	cmake .. \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DENABLE_UNSTABLE_API_ABI_HEADERS=ON \
		-DBUILD_QT5_TESTS=OFF \
		-DENABLE_QT5=OFF
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

utils() {
	pkgdesc="Poppler's xpdf-workalike command line utilities"
	install -d "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

glib() {
	pkgdesc="Glib wrapper for poppler"
	replaces="poppler-gtk"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libpoppler-glib.so.* \
		"$pkgdir"/usr/lib/girepository* \
		"$subpkgdir"/usr/lib/
}

_cpp() {
	pkgdesc="Pure C++ wrapper for poppler"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libpoppler-cpp.so.* \
		"$subpkgdir"/usr/lib/
}

sha512sums="1631be30e398dd18a4e8c2cc893cf0d9469a98d93f02f2ffe3bc14857518b76674a10cafe89ee92b9886c3c6b03d50e214a6838c102f673a62789c9832cfa4a2  poppler-0.82.0.tar.xz"