Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 128 additions & 0 deletions ghostscript.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
package:
name: ghostscript
version: 10.01.2
epoch: 0
description: Interpreter for the PostScript language and for PDF
copyright:
- license: AGPL-3.0-or-later

environment:
contents:
packages:
- busybox
- ca-certificates-bundle
- build-base
- autoconf
- automake
- cups-dev
- expat-dev
- freetype-dev
- gtk-2.0-dev
- jbig2dec-dev
- lcms2-dev
- libjpeg-turbo
- libpng-dev
- libtool
- openjpeg-dev
- tiff-dev
- zlib-dev

var-transforms:
- from: ${{package.version}}
match: \.
replace: ''
to: mangled-package-version

pipeline:
- uses: fetch
with:
expected-sha512: 11887850d440b8bbd8b83b8b58df8c743cf94be8fdbcfbda1a5fce55ce7c6a963d94b41a4ebcf1ba48f64f8af01e76dec789e2711212b1f7a32f98c42d75e0ff
uri: https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${{vars.mangled-package-version}}/ghostscript-${{package.version}}.tar.gz

- uses: patch
with:
patches: fix-sprintf.patch

- uses: patch
with:
patches: ghostscript-system-zlib.patch

- runs: |
rm -r jpeg libpng zlib tiff lcms2mt cups/libs jbig2dec \
freetype

# fix parallel builds
sed -i -e 's/ECHO_XE/ECHOGS_XE/g' \
-e 's/^\($(GLOBJ)md5.$(OBJ) :.*\)/\1 $(ECHOGS_XE)/' \
base/lib.mak
aclocal && autoconf --force

cd ./ijs
libtoolize --force && aclocal && autoconf && automake --add-missing

- uses: autoconf/configure
with:
dir: ijs
opts: |
CFLAGS="$CFLAGS -flto=auto" \
--enable-shared \
--disable-static

- uses: autoconf/make
with:
dir: ijs

- uses: autoconf/make-install
with:
dir: ijs

- uses: autoconf/configure
with:
dir: .
opts: |
--docdir=/usr/share/doc/ghostscript \
--with-system-libtiff \
--with-ijs \
--with-jbig2dec \
--without-libpaper \
--without-versioned-path \
--enable-gtk \
--with-drivers=ALL \
--with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts \
--disable-compile-inits

- runs: |
make so all
make -j1 DESTDIR="${{targets.destdir}}" install soinstall
# create empty dir for future fonts
mkdir -p "${{targets.destdir}}"/usr/share/fonts/Type1

- uses: strip

subpackages:
- name: ghostscript-doc
pipeline:
- uses: split/manpages
description: ghostscript manpages

- name: "ghostscript-dbg"
description: "ghostscript Debug Symbols"
pipeline:
- uses: split/debug
dependencies:
runtime:
- ghostscript

- name: ghostscript-dev
pipeline:
- uses: split/dev
description: ghostscript dev
dependencies:
runtime:
- ghostscript

update:
enabled: true
manual: true
release-monitor:
identifier: 1157
18 changes: 18 additions & 0 deletions ghostscript/fix-sprintf.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# https://git.alpinelinux.org/aports/tree/main/ghostscript/fix-sprintf.patch
diff --git a/cups/gdevcups.c b/cups/gdevcups.c
index c00e758..35b4035 100644
--- a/cups/gdevcups.c
+++ b/cups/gdevcups.c
@@ -4353,10 +4353,10 @@ cups_set_color_info(gx_device *pdev) /* I - Device info */
*/

if (pdev->HWResolution[0] != pdev->HWResolution[1])
- sprintf(resolution, "%.0fx%.0fdpi", pdev->HWResolution[0],
+ snprintf(resolution, sizeof(resolution), "%.0fx%.0fdpi", pdev->HWResolution[0],
pdev->HWResolution[1]);
else
- sprintf(resolution, "%.0fdpi", pdev->HWResolution[0]);
+ snprintf(resolution, sizeof(resolution), "%.0fdpi", pdev->HWResolution[0]);

for (i = 0, profile = cups->PPD->profiles;
i < cups->PPD->num_profiles;
15 changes: 15 additions & 0 deletions ghostscript/ghostscript-system-zlib.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# https://git.alpinelinux.org/aports/tree/main/ghostscript/ghostscript-system-zlib.patch
diff --git a/base/lib.mak b/base/lib.mak
index e8ee4e7..4abaa05 100644
--- a/base/lib.mak
+++ b/base/lib.mak
@@ -589,7 +589,9 @@ srlx_h=$(GLSRC)srlx.h
sstring_h=$(GLSRC)sstring.h
strimpl_h=$(GLSRC)strimpl.h $(scommon_h) $(gstypes_h) $(gsstruct_h)
szlibx_h=$(GLSRC)szlibx.h
+ifneq ($(SHARE_ZLIB),1)
zlib_h=$(ZSRCDIR)$(D)zlib.h
+endif
# We have two of the following, for shared zlib (_1)
# and 'local' zlib (_0)
szlibxx_h_1=$(GLSRC)szlibxx.h $(szlibx_h)
64 changes: 64 additions & 0 deletions openjpeg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
package:
name: openjpeg
version: 2.5.0
epoch: 0
description: "Open-source implementation of JPEG2000 image codec"
copyright:
- license: BSD-2-Clause-NetBSD

environment:
contents:
packages:
- wolfi-base
- busybox
- ca-certificates-bundle
- build-base
- libpng-dev
- tiff-dev
- lcms2-dev
- doxygen
- cmake
- samurai

pipeline:
- uses: fetch
with:
uri: https://github.com/uclouvain/openjpeg/archive/v${{package.version}}/openjpeg-v${{package.version}}.tar.gz
expected-sha512: 08975a2dd79f1e29fd1824249a5fbe66026640ed787b3a3aa8807c2c69f994240ff33e2132f8bf15bbc2202bef7001f98e42d487231d4eebc8e503538658049a

# - uses: patch
# with:
# patches: fix-cmakelists.patch

- uses: cmake/configure
with:
opt: |
-G Ninja \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=/usr \
-DOPENJPEG_INSTALL_LIB_DIR=lib

- uses: cmake/build

- uses: cmake/install

subpackages:
- name: "openjpeg-dev"
description: "headers for openjpeg"
pipeline:
- uses: split/dev
dependencies:
runtime:
- openjpeg

- name: openjpeg-tools
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/usr/bin
mv ${{targets.destdir}}/usr/bin/ ${{targets.subpkgdir}}/usr/bin/
description: openjpeg (development tools)

update:
enabled: true
release-monitor:
identifier: 2550
12 changes: 12 additions & 0 deletions openjpeg/fix-cmakelists.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# https://git.alpinelinux.org/aports/tree/main/openjpeg/fix-cmakelists.patch
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -148,7 +148,7 @@
# We could install *.cmake files in share/ however those files contains
# hardcoded path to libraries on a multi-arch system (fedora/debian) those
# path will be different (lib/i386-linux-gnu vs lib/x86_64-linux-gnu)
- set(OPENJPEG_INSTALL_PACKAGE_DIR "${OPENJPEG_INSTALL_LIB_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
+ set(OPENJPEG_INSTALL_PACKAGE_DIR "${OPENJPEG_INSTALL_LIB_DIR}/cmake/${OPENJPEG_INSTALL_SUBDIR}")
endif()

if (APPLE)
2 changes: 2 additions & 0 deletions packages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,13 @@ cups
alsa-lib
zip
libpng
openjpeg
freetype
fontconfig
giflib
libjpeg-turbo
lcms2
ghostscript
su-exec
llvm15
postgresql-11,postgresql
Expand Down