Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Aug 2005 03:19:07 +0800 (CST)
From:      chinsan <chinsan.tw@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        pav@FreeBSD.org, trevor@FreeBSD.org
Subject:   ports/84877: [PATCH] print/acroreader7: fix rpm error & apply konb to Master/Slave port
Message-ID:  <20050813191907.BFFE573045@chinsan.twbbs.org>
Resent-Message-ID: <200508131920.j7DJKMNF018525@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         84877
>Category:       ports
>Synopsis:       [PATCH] print/acroreader7: fix rpm error & apply konb to Master/Slave port
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 13 19:20:21 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     chinsan
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
FreeBSD Taiwan
>Environment:
System: FreeBSD chinsan.twbbs.org 5.4-STABLE FreeBSD 5.4-STABLE #0: Wed Aug 10 04:42:20 CST 2005 root@chinsan.twbbs.org:/usr/obj/usr/src/sys/TAKAKO i386

>Description:

** Fix some typo error in ports/84875, 	    			   **
** and typo error of ADOBE_LANG konb section in the last shar file **

	- may the following message apply to /usr/ports/UPDATING ?
20050814:
 AFFECTS: users of print/acroreader7
 AUTHOR: chinsan.tw@gmail.com

 the former acroreader7 didn't completely uninstall rpm database.
 If you currently have the acroreader7 port installed, and want rpm database
 more cleaner after next uninstall/upgrade. Please type:

    `portupgrade -rf acroreader7'

	- While uninstall acroreader7,
	  it didn't completely clean rpm database.

	- add ADOBE_LANG knob to apply
	  Master/slave support for other language port.
	  Thanks to Ion-Mihai Tetcu<itetcu@people.tecnik93.com>

	- port maintainer(trevor@FreeBSD.org) is CC'd.

	Thanks! :)

>How-To-Repeat:
# cd /usr/ports/print/acroread7
# make install clean
# make deinstall
# rpm -qa --root /usr/compat/linux/ --dbpath /var/lib/rpm |grep AdobeReader
AdobeReader_enu-7.0.0-2

AdobeReader 7 rpm still live in rpm database....:(

>Fix:

--- acroread7.diff begins here ---
diff -ruN acroread7.orig/Makefile acroread7/Makefile
--- acroread7.orig/Makefile	Wed Aug 10 09:00:45 2005
+++ acroread7/Makefile	Sun Aug 14 03:03:14 2005
@@ -7,17 +7,17 @@
 
 PORTNAME=	acroread7
 PORTVERSION=	7.0.0
-CATEGORIES=	print linux
-MASTER_SITES=	http://download.adobe.com/pub/adobe/reader/unix/7x/7.0/enu/ \
-		ftp://ftp.adobe.com/pub/adobe/reader/unix/7x/7.0/enu/
-DISTNAME=	AdobeReader_enu-7.0.0-2.i386.rpm
+CATEGORIES+=	print linux
+MASTER_SITES=	http://download.adobe.com/pub/adobe/reader/unix/7x/7.0/${ADOBE_LANG}/ \
+		ftp://ftp.adobe.com/pub/adobe/reader/unix/7x/7.0/${ADOBE_LANG}/
+DISTNAME=	AdobeReader_${ADOBE_LANG}-7.0.0-2.i386.rpm
 EXTRACT_SUFX=
 DIST_SUBDIR=	acroread
 EXTRACT_ONLY=
 RESTRICTED=	"Must fill out redistribution form at http://www.adobe.com/products/acrobat/distribute.html"
 
-MAINTAINER=	trevor@FreeBSD.org
-COMMENT=	View, distribute and print PDF documents
+MAINTAINER?=	trevor@FreeBSD.org
+COMMENT?=	View, distribute and print PDF documents
 
 BUILD_DEPENDS=	rpm:${PORTSDIR}/archivers/rpm
 RUN_DEPENDS=	${LINUXBASE}/usr/lib/libgtk-x11-2.0.so.0:${PORTSDIR}/x11-toolkits/linux-gtk2 \
@@ -34,6 +34,10 @@
 PLIST=		${WRKDIR}/plist
 PREFIX?=	${LINUXBASE}	# have a look at the USE_XLIB comment
 
+.if !defined(ADOBE_LANG)
+ADOBE_LANG?=	enu
+.endif
+
 pre-install:
 	@kldstat -v | ${GREP} -E 'linux(aout|elf)' >/dev/null ||\
 		{ ${ECHO_MSG} "Linux ABI compatibility must be enabled to install ${PORTNAME}-${PORTVERSION}"; \
@@ -49,9 +53,11 @@
 	@${ECHO} @cwd %%LOCALBASE%% >> ${PLIST}
 	@${ECHO} bin/acroread7 >> ${PLIST}
 	@${ECHO} bin/acroread >> ${PLIST}
+	@${ECHO} "@unexec rpm -e --noscripts --root ${PREFIX} --dbpath /var/lib/rpm \
+		${DISTNAME:S/.i386.rpm//} 2>/dev/null || ${TRUE}"  >> ${PLIST}
 
 do-install:
-	@rpm -U --ignorearch --ignoreos --root ${PREFIX} --dbpath /var/lib/rpm \
+	@rpm -U --force --ignorearch --ignoreos --root ${PREFIX} --dbpath /var/lib/rpm \
 		 --nodeps --replacepkgs ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME} || ${TRUE}
 	# disable the PPKLite plugin as it requires an LDAP share lib
 	${CHMOD} 0 ${PREFIX}/usr/local/Adobe/Acrobat7.0/Reader/intellinux/plug_ins/PPKLite.api
@@ -63,6 +69,6 @@
 	cd ${LOCALBASE}/bin ; ${LN} -sf ${PREFIX}/usr/local/Adobe/Acrobat7.0/bin/acroread acroread7
 	cd ${LOCALBASE}/bin ; ${LN} -sf ${PREFIX}/usr/local/Adobe/Acrobat7.0/bin/acroread acroread
 	@${ECHO_MSG} "Be sure to read the license agreement in"
-	@${ECHO_MSG} "${PREFIX}/usr/local/Adobe/Acrobat7.0/Reader/Legal/ENU/license_ENU_uc.txt"
+	@${ECHO_MSG} "${PREFIX}/usr/local/Adobe/Acrobat7.0/Reader/Legal/${ADOBE_LANG:U}/license_${ADOBE_LANG:U}_uc.txt"
 
 .include <bsd.port.mk>
--- acroread7.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050813191907.BFFE573045>