-
Notifications
You must be signed in to change notification settings - Fork 417
add ghostscript & openjpeg #3115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
developer-guy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
developer-guy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
developer-guy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| +++ 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) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.