View | Details | Raw Unified | Return to bug 270989 | Differences between
and this patch

Collapse All | Expand All

(-)b/Mk/Uses/ghostscript.mk (-9 / +21 lines)
Lines 30-44 _INCLUDE_USES_GHOSTSCRIPT_MK= yes Link Here
30
# allowed versions
30
# allowed versions
31
# When adding a version, please keep the comment in
31
# When adding a version, please keep the comment in
32
# Mk/bsd.default-versions.mk in sync.
32
# Mk/bsd.default-versions.mk in sync.
33
_GS_VERSION=	7 8 9 agpl
33
_GS_VERSION=	7 8 9 agpl 10
34
34
35
_GS_ARGS=		${ghostscript_ARGS}
35
_GS_ARGS=		${ghostscript_ARGS}
36
36
37
.  if ${_GS_ARGS:N[789]:Nagpl:Nx11:Nbuild:Nrun:Ntest}
37
.  if ${_GS_ARGS:N[789]:Nagpl:N10:Nx11:Nbuild:Nrun:Ntest}
38
IGNORE?=	Unknown ghostscript argument ${_GS_ARGS}
38
IGNORE?=	Unknown ghostscript argument ${_GS_ARGS}
39
.  endif
39
.  endif
40
40
41
.  if ${GHOSTSCRIPT_DEFAULT:N[789]:Nagpl}
41
.  if ${GHOSTSCRIPT_DEFAULT:N[789]:Nagpl:N10}
42
IGNORE?=	Invalid GHOSTSCRIPT_DEFAULT value: ${GHOSTSCRIPT_DEFAULT}, please select one of ${_GS_VERSION}
42
IGNORE?=	Invalid GHOSTSCRIPT_DEFAULT value: ${GHOSTSCRIPT_DEFAULT}, please select one of ${_GS_VERSION}
43
.  endif
43
.  endif
44
44
Lines 67-73 _GS_RUN_DEP= yes Link Here
67
.undef _GS_SELECTED
67
.undef _GS_SELECTED
68
.  for V in ${_GS_ARGS} ${GHOSTSCRIPT_DEFAULT}
68
.  for V in ${_GS_ARGS} ${GHOSTSCRIPT_DEFAULT}
69
_V=${V}
69
_V=${V}
70
.    if ${_V:M9}
70
.    if ${_V:M10}
71
_GS_SELECTED?=		10
72
.    elif ${_V:M9}
71
_GS_SELECTED?=		9
73
_GS_SELECTED?=		9
72
.    elif ${_V:Magpl}
74
.    elif ${_V:Magpl}
73
_GS_SELECTED?=		9-agpl
75
_GS_SELECTED?=		9-agpl
Lines 78-85 _GS_SELECTED?= 7 Link Here
78
.    endif
80
.    endif
79
.  endfor
81
.  endfor
80
82
83
84
.undef _GS_FLAVORED
85
.  if empty(_GS_SELECTED:M[789]*)
86
_GS_FLAVORED=	yes
87
.  endif
88
81
# Resolve minor version number for X11.so library.
89
# Resolve minor version number for X11.so library.
82
.  if !empty(_GS_SELECTED:M9-agpl)
90
.  if !empty(_GS_SELECTED:M10)
91
_GS_VERSION_MINOR=	10.01.1_1
92
.  elif !empty(_GS_SELECTED:M9-agpl)
83
_GS_VERSION_MINOR=	9.16_2
93
_GS_VERSION_MINOR=	9.16_2
84
.  elif !empty(_GS_SELECTED:M9)
94
.  elif !empty(_GS_SELECTED:M9)
85
_GS_VERSION_MINOR=	9.06_11
95
_GS_VERSION_MINOR=	9.06_11
Lines 90-103 _GS_VERSION_MINOR= 7.07_32 Link Here
90
.  endif
100
.  endif
91
101
92
# dependencies
102
# dependencies
93
_GS_PORT=	ghostscript${_GS_SELECTED}-base
103
_GS_PKGBASE=	ghostscript${_GS_SELECTED}-base
94
_GS_X11_PORT=	ghostscript${_GS_SELECTED}-x11
104
_GS_X11_PKGBASE=	ghostscript${_GS_SELECTED}-x11
105
_GS_PORT=	ghostscript${_GS_SELECTED}${_GS_FLAVORED:?@:-}base
106
_GS_X11_PORT=	ghostscript${_GS_SELECTED}${_GS_FLAVORED:?@:-}x11
95
107
96
.  for type in BUILD RUN TEST
108
.  for type in BUILD RUN TEST
97
.    if defined(_GS_${type}_DEP)
109
.    if defined(_GS_${type}_DEP)
98
${type}_DEPENDS+=	${_GS_PORT}>=${_GS_VERSION_MINOR}:print/${_GS_PORT}
110
${type}_DEPENDS+=	${_GS_PKGBASE}>=${_GS_VERSION_MINOR}:print/${_GS_PORT}
99
.      if ${_GS_ARGS:Mx11}
111
.      if ${_GS_ARGS:Mx11}
100
${type}_DEPENDS+=	${_GS_X11_PORT}>=${_GS_VERSION_MINOR}:print/${_GS_X11_PORT}
112
${type}_DEPENDS+=	${_GS_X11_PKGBASE}>=${_GS_VERSION_MINOR}:print/${_GS_X11_PORT}
101
.      endif
113
.      endif
102
.    endif
114
.    endif
103
.  endfor
115
.  endfor
(-)b/Mk/bsd.default-versions.mk (-1 / +1 lines)
Lines 53-59 GCC_DEFAULT?= 8 Link Here
53
.  else
53
.  else
54
GCC_DEFAULT?=		12
54
GCC_DEFAULT?=		12
55
.  endif
55
.  endif
56
# Possible values: 7, 8, 9, agpl
56
# Possible values: 7, 8, 9, agpl, 10
57
GHOSTSCRIPT_DEFAULT?=	agpl
57
GHOSTSCRIPT_DEFAULT?=	agpl
58
# Possible values: mesa-libs, mesa-devel
58
# Possible values: mesa-libs, mesa-devel
59
GL_DEFAULT?=		mesa-libs
59
GL_DEFAULT?=		mesa-libs
(-)b/print/ghostscript10/Makefile (-6 / +40 lines)
Lines 3-8 DISTVERSION= 10.01.1 Link Here
3
PORTREVISION=	1
3
PORTREVISION=	1
4
CATEGORIES=	print
4
CATEGORIES=	print
5
MASTER_SITES=	https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${DISTVERSION:S/.//g}/
5
MASTER_SITES=	https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${DISTVERSION:S/.//g}/
6
PKGNAMESUFFIX=  ${PORTVERSION:C/\..*//}-${FLAVOR}
6
7
7
MAINTAINER=	michael.osipov@siemens.com
8
MAINTAINER=	michael.osipov@siemens.com
8
COMMENT=	PostScript and PDF interpreter
9
COMMENT=	PostScript and PDF interpreter
Lines 11-16 WWW= https://ghostscript.com/ Link Here
11
LICENSE=	AGPLv3
12
LICENSE=	AGPLv3
12
LICENSE_FILE=	${WRKSRC}/LICENSE
13
LICENSE_FILE=	${WRKSRC}/LICENSE
13
14
15
FLAVORS=	base x11
16
FLAVOR?=	${FLAVORS:[1]}
17
14
LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
18
LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
15
		libfreetype.so:print/freetype2 \
19
		libfreetype.so:print/freetype2 \
16
		libidn.so:dns/libidn \
20
		libidn.so:dns/libidn \
Lines 48-54 GNU_CONFIGURE= yes Link Here
48
CONFIGURE_ARGS=	--disable-compile-inits \
52
CONFIGURE_ARGS=	--disable-compile-inits \
49
		--disable-dbus \
53
		--disable-dbus \
50
		--disable-gtk \
54
		--disable-gtk \
51
		--disable-dynamic \
52
		--enable-contrib \
55
		--enable-contrib \
53
		--enable-fontconfig \
56
		--enable-fontconfig \
54
		--enable-freetype \
57
		--enable-freetype \
Lines 58-65 CONFIGURE_ARGS= --disable-compile-inits \ Link Here
58
		--with-libiconv=maybe \
61
		--with-libiconv=maybe \
59
		--with-libidn \
62
		--with-libidn \
60
		--with-libpaper \
63
		--with-libpaper \
61
		--with-system-libtiff \
64
		--with-system-libtiff
62
		--without-x
65
66
67
GS_VERSION=	${DISTVERSION:S/./ /g:tw:[1..2]:tW:S/ /./}
68
PLIST_SUB=	GS_VERSION=${GS_VERSION}
63
69
64
OPTIONS_DEFINE=	CUPS IJS TESSERACT
70
OPTIONS_DEFINE=	CUPS IJS TESSERACT
65
OPTIONS_DEFAULT=CUPS
71
OPTIONS_DEFAULT=CUPS
Lines 78-89 TESSERACT_CONFIGURE_WITH= tesseract Link Here
78
# No TESSERACT_LIB_DEPENDS=	libtesseract.so:graphics/tesseract
84
# No TESSERACT_LIB_DEPENDS=	libtesseract.so:graphics/tesseract
79
# See https://bugs.ghostscript.com/show_bug.cgi?id=706490
85
# See https://bugs.ghostscript.com/show_bug.cgi?id=706490
80
86
81
post-patch:
87
.if !empty(FLAVOR:Mx11)
88
USES+=		xorg
89
USE_XORG=	ice sm x11 xext xt
90
CONFIGURE_ARGS+=	--with-x \
91
                --disable-hidden-visibility \
92
		--enable-dynamic
93
ALL_TARGET=	./obj/X11.so
94
PLIST_FILES=	lib/ghostscript/${DISTVERSION}/X11.so
95
PLIST=
96
INSTALL_TARGET=	install-shared
97
.elif !empty(FLAVOR:Mbase)
98
CONFIGURE_ARGS+=	--without-x \
99
		--disable-dynamic
100
ALL_TARGET=	so
101
INSTALL_TARGET=	soinstall
102
.endif
103
104
post-patch: post-patch-${FLAVOR}
105
post-install: post-install-${FLAVOR}
106
107
post-patch-base:
82
	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
108
	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
83
		${PATCH_WRKSRC}/man/gs.1
109
		${PATCH_WRKSRC}/man/gs.1
84
110
85
post-install:
111
post-patch-x11:
86
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/gs
112
	@:
113
114
post-install-base:
115
	${MV} ${STAGEDIR}${PREFIX}/bin/gsc ${STAGEDIR}${PREFIX}/bin/gs
116
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/gs ${STAGEDIR}${PREFIX}/bin/gsx \
117
		${STAGEDIR}${PREFIX}/lib/libgs.so.${GS_VERSION}
87
	${RM} ${STAGEDIR}${PREFIX}/bin/lprsetup.sh
118
	${RM} ${STAGEDIR}${PREFIX}/bin/lprsetup.sh
88
	${RM} ${STAGEDIR}${PREFIX}/bin/unix-lpr.sh
119
	${RM} ${STAGEDIR}${PREFIX}/bin/unix-lpr.sh
89
	${MKDIR} ${STAGEDIR}${PREFIX}/share/color/icc
120
	${MKDIR} ${STAGEDIR}${PREFIX}/share/color/icc
Lines 99-102 post-install: Link Here
99
	${RLN} ${STAGEDIR}${PREFIX}/share/cmap \
130
	${RLN} ${STAGEDIR}${PREFIX}/share/cmap \
100
		${STAGEDIR}${DATADIR}/Resource/CMap
131
		${STAGEDIR}${DATADIR}/Resource/CMap
101
132
133
post-install-x11:
134
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/ghostscript/${DISTVERSION}/X11.so
135
102
.include <bsd.port.mk>
136
.include <bsd.port.mk>
(-)b/print/ghostscript10/pkg-plist (+8 lines)
Lines 1-6 Link Here
1
bin/dvipdf
1
bin/dvipdf
2
bin/eps2eps
2
bin/eps2eps
3
bin/gs
3
bin/gs
4
bin/gsx
4
bin/gsbj
5
bin/gsbj
5
bin/gsdj
6
bin/gsdj
6
bin/gsdj500
7
bin/gsdj500
Lines 22-27 bin/ps2pdf14 Link Here
22
bin/ps2pdfwr
23
bin/ps2pdfwr
23
bin/ps2ps
24
bin/ps2ps
24
bin/ps2ps2
25
bin/ps2ps2
26
include/ghostscript/gdevdsp.h
27
include/ghostscript/gserrors.h
28
include/ghostscript/iapi.h
29
include/ghostscript/ierrors.h
30
lib/libgs.so
31
lib/libgs.so.10
32
lib/libgs.so.%%GS_VERSION%%
25
man/man1/dvipdf.1.gz
33
man/man1/dvipdf.1.gz
26
man/man1/eps2eps.1.gz
34
man/man1/eps2eps.1.gz
27
man/man1/gs.1.gz
35
man/man1/gs.1.gz

Return to bug 270989