Bug 96745 - [MAINTAINER] net-im/psi - Add optional patches from Gentoo; create slave port
Summary: [MAINTAINER] net-im/psi - Add optional patches from Gentoo; create slave port
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Andrey Slusar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-04 05:20 UTC by Shaun Amott
Modified: 2006-05-27 08:01 UTC (History)
0 users

See Also:


Attachments
file.shar (816 bytes, text/plain)
2006-05-04 05:20 UTC, Shaun Amott
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shaun Amott 2006-05-04 05:20:18 UTC
- Add a collection of optional patches from Gentoo to the Psi port.
- Create a slave port with patches enabled.

Tinderbox tested on: 5.x (sparc64)
Manually tested on : 7.x (i386)

Requested by + initial work by Stephan Maka

Fix: ----- Begin psi.diff -----
----- Begin psi-gentoo.shar -----


----- End psi-gentoo.shar -------8EheTifN82JlQWJYi1iDKv1KALCN7u9HWy7SP8W1cMmG5ss3
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

diff -urN psi.orig/Makefile psi/Makefile
--- psi.orig/Makefile	Sat Apr 15 21:31:54 2006
+++ psi/Makefile	Wed May  3 05:21:14 2006
@@ -12,7 +12,7 @@
 MASTER_SITE_SUBDIR=	${PORTNAME}
 
 MAINTAINER=	shaun@inerd.com
-COMMENT=	A Qt-based Jabber client
+COMMENT?=	A Qt-based Jabber client
 
 BUILD_DEPENDS=	qmake:${PORTSDIR}/devel/qmake
 LIB_DEPENDS=	qca.1:${PORTSDIR}/devel/qca
@@ -36,6 +36,16 @@
 
 PORTDOCS=	README ChangeLog
 
+OPTIONS?=	GENTOO_EXTRAS "Build with unofficial Gentoo patches"	off
+
+PLIST_SUB=	GENTOO="@comment "
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_GENTOO_EXTRAS)
+.	include "Makefile.gentoo"
+.endif
+
 post-install:
 	${STRIP_CMD} ${PREFIX}/bin/psi
 .if !defined(NOPORTDOCS)
@@ -45,4 +55,4 @@
 .endfor
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -urN psi.orig/Makefile.gentoo psi/Makefile.gentoo
--- psi.orig/Makefile.gentoo	Thu Jan  1 01:00:00 1970
+++ psi/Makefile.gentoo	Thu May  4 01:45:41 2006
@@ -0,0 +1,178 @@
+# New ports collection makefile for:	psi
+# Date created:		Wed Feb  15 20:27:23 CET 2006
+# Whom:			stephan@spaceboyz.net
+#
+# $FreeBSD$
+#
+
+MASTER_SITES+=	http://vivid.dat.pl/psi/:vivid \
+		http://csociety-ftp.ecn.purdue.edu/pub/gentoo-portage/net-im/psi/files/:portage \
+		${MASTER_SITE_GENTOO:C/gentoo\/%SUBDIR%/gentoo-portage\/net-im\/psi\/files/g}:portage
+
+DISTFILES=	${DISTNAME}${EXTRACT_SUFX} gentoo-psi-0.10.tar.bz2:vivid psi-indicator.png:portage
+EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX} gentoo-psi-0.10.tar.bz2
+GENTOO_PATCHES=	${WRKDIR}/0.10
+PKGNAMESUFFIX=	-gentoo
+
+PATCH_DEPENDS+=	gpatch:${PORTSDIR}/devel/patch
+GPATCH=		${LOCALBASE}/bin/gpatch
+
+PLIST_SUB=	GENTOO=""
+
+post-patch::
+	# from http://norman.rasmussen.co.za/darcs/psi-muc/
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-muc_support.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-muc_support-update-20051123.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-muc_support-update-20060114.patch
+
+	# roster-nr
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-fix_popup_richtext.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-roster-nr-0.9.14.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-status_indicator++_add-on_roster-nr.patch
+	# indicator icon
+	${CP} ${DISTDIR}/psi-indicator.png ${WRKSRC}/iconsets/roster/default/indicator.png
+
+	# from http://www.cs.kuleuven.ac.be/~remko/psi/
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/jep8-avatars_iris.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/jep8-avatars_psi.diff
+
+	# from http://machekku.uaznia.net/jabber/psi/patches/
+	${REINPLACE_CMD} 's#<includehint>fortuneslistbox.h</includehint>##' ${GENTOO_PATCHES}/psi-machekku-smart_reply_and_forward-0.5_psi-gentoo.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-machekku-smart_reply_and_forward-0.5_psi-gentoo.diff
+	${GPATCH} -d ${WRKSRC} -p2 < ${GENTOO_PATCHES}/psi-machekku-keep_message_in_auto_away_status.diff
+	${GPATCH} -d ${WRKSRC} -p2 < ${GENTOO_PATCHES}/psi-machekku-quote_emoticons.diff
+	${GPATCH} -d ${WRKSRC} -p2 < ${GENTOO_PATCHES}/psi-machekku-emoticons_advanced_toggle.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-machekku-enable_thread_in_messages.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-machekku-linkify_fix.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-machekku-autostatus_while_dnd.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-machekku-visual_styles_manifest.diff
+	${GPATCH} -d ${WRKSRC} -p2 < ${GENTOO_PATCHES}/psi-machekku-tool_window_minimize_fix_for_windows.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-machekku-new_character_counter.diff
+
+	# from ftp://ftp.patryk.one.pl/pub/psi/skazi/patches/
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-options_resize-fix.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-settoggles-fix.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-line_in_options-mod.diff
+	${GPATCH} -d ${WRKSRC} -p0 < ${GENTOO_PATCHES}/psi-empty_group-fix.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-no_online_status-mod.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-status_history-add-psi-gentoo.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-icon_buttons_big_return-mod.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-linkify-mod-rev-fix.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-save_profile-mod.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-url_emoticon-mod.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-thin_borders-mod.diff
+
+	# from http://www.uaznia.net/psi-daisy/patches/
+	${GPATCH} -d ${WRKSRC} -p0 < ${GENTOO_PATCHES}/filetransfer.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-emots-mod.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi_michalj_statusicon_in_chatdlg_titlebar.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi_michalj_custom_rostericons_in_tooltips.diff
+
+	# from ftp://ftp.patryk.one.pl/pub/psi/patches/
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-psz-chatdlg_typed_msgs_history.diff
+
+	# from http://kg.alternatywa.info/psi/patche/
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-status-timeout-kfix.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-kg-spoof.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-kg-individual_status_add.diff
+
+	# from pld-linux.org
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-certs.patch
+
+	# upstream patches from psi-flyspray
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-fix_groupsortingstyle_toggles.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-multiple_account_groups.diff
+
+	# from http://psi-pedrito.go.pl/
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/pedrito-null-key-string-fix.diff
+	${GPATCH} -d ${WRKSRC} -p0 < ${GENTOO_PATCHES}/pedrito-avatars-printf-off.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/pedrito-linkify_and_wrap-client.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/pedrito-group_menuitem_for_notinlist.diff
+
+	# from psi-devel mailing list
+	${GPATCH} -d ${WRKSRC} -p0 < ${GENTOO_PATCHES}/psi-history_lug.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-history-deletion-bugfix.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/checkboxes-sound-options.diff
+
+	# from http://mircea.bardac.net/psi/patches/
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-cli-v2.diff
+
+	# from ubuntu
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-trayicon_ubuntu_fix.patch
+
+	# from http://home.unclassified.de/files/psi/patches/
+	${GPATCH} -d ${WRKSRC} -p2 < ${GENTOO_PATCHES}/statusdlg-enterkey.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/fix-min-window-notify.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/hide-no-resource-from-contextmenu.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/custom-sound-popup.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/offline-contact-animation.diff
+
+	# from bugs.gentoo.org
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-add-status-history.patch
+
+	# from http://rydz.homedns.org
+	${GPATCH} -d ${WRKSRC} -p2 < ${GENTOO_PATCHES}/psi-filetransfer-finish-popup-qsorix.patch
+
+	# from http://k.uaznia.net/jabber/psi/patches/
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/a-psi-k-emergency_away_status_button.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-evil_message_support.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-auto_responder.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-auto_responder_gui.patch
+
+	# from http://www.cs.kuleuven.ac.be/~remko/psi/
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/rosteritems_iris.diff
+	# this one was chagned because of muc support
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/rosteritems_psi_with_muc.diff
+
+	# from http://delx.cjb.net/psi/
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-nicknames.patch
+
+	# from http://norman.rasmussen.co.za/darcs/psi-rc/
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/norman-rc.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/norman-darcs-20051129.diff
+	# from http://machekku.uaznia.net/jabber/psi/patches/
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-machekku-rc_multiline_status_fix.diff
+	# from http://norman.rasmussen.co.za/darcs/psi-rc/
+	${REINPLACE_CMD} -e 's#src/rc.cpp#rc.cpp#' ${GENTOO_PATCHES}/psi-dynamic-priority-rc-fix.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-dynamic-priority-rc-fix.diff
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/norman-darcs-20051231.patch
+
+	# created for psi-gentoo and roster-nr
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-smile_icon_emoticonset.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-enable_avatars.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-transport_icons_and_avatars.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-client_avatars_icons.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-emoticons_advanced_toggle-add-roster-nr.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-chatdlg_messages_colors_distinguishes.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-messages_color_backgrounds_in_chat.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-sort-style-on-roster-nr.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-says_mod.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-muc_support_langpacks_fix.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-copy_jid_or_status_message_to_clipboard.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-timestamps_option_and_date_showing.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-avatars_graph_settings_filetypes.patch
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-auto_responder_by_message.patch
+	# by nelchael
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-nelchael-exec_command.patch
+	#${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-nelchael-xmms-status.patch
+
+	${GPATCH} -d ${WRKSRC} -p1 < ${GENTOO_PATCHES}/psi-gentoo-version.patch
+
+	# Repair Makefile
+	${MV} ${WRKSRC}/src/psiaccount.cpp ${WRKSRC}/src/psiaccount.cpp.orig
+	${SED} 	-e 's/include"adhoc.h"/include"..\/adhoc.h"/' \
+		-e 's/include"rc.h"/include"..\/rc.h"/' \
+		-e 's/include"adhoc_fileserver.h"/include"..\/adhoc_fileserver.h"/' \
+		${WRKSRC}/src/psiaccount.cpp.orig > ${WRKSRC}/src/psiaccount.cpp
+
+	# Move misplaced files
+	${MV} 	${WRKSRC}/adhoc.cpp \
+		${WRKSRC}/adhoc.h \
+		${WRKSRC}/adhoc_fileserver.cpp \
+		${WRKSRC}/adhoc_fileserver.h \
+		${WRKSRC}/rc.cpp \
+		${WRKSRC}/rc.h \
+		${WRKSRC}/src/
+
+	# Move pre-patched junk out of the way
+	@${FIND} ${WRKSRC} \( -name '*~' -or -name '*.orig' \) -delete
diff -urN psi.orig/distinfo psi/distinfo
--- psi.orig/distinfo	Thu Mar 23 02:04:03 2006
+++ psi/distinfo	Thu May  4 01:40:46 2006
@@ -1,3 +1,9 @@
 MD5 (psi-0.10.tar.bz2) = f0fd4ccf077f7b24e236f71c22649b7b
 SHA256 (psi-0.10.tar.bz2) = e10a88586f8d7f29535510cf3a3857dc8ff2792e64db4207d62a935890a60ca1
 SIZE (psi-0.10.tar.bz2) = 1430929
+MD5 (gentoo-psi-0.10.tar.bz2) = 4aacc2de659a5a551e9b47382af83c35
+SHA256 (gentoo-psi-0.10.tar.bz2) = 1d499ecb693401a69600d48c62bc3cbd3f4eed7605729655959d13af981d72bd
+SIZE (gentoo-psi-0.10.tar.bz2) = 211538
+MD5 (psi-indicator.png) = 0d5cafd17325fc912c4855252d73378f
+SHA256 (psi-indicator.png) = a0e9adcd0409d23c9033170ceb8f22980ba6d5e14f19234630f9986bfb94bce2
+SIZE (psi-indicator.png) = 300
diff -urN psi.orig/pkg-plist psi/pkg-plist
--- psi.orig/pkg-plist	Thu Mar 23 02:04:28 2006
+++ psi/pkg-plist	Wed May  3 15:38:21 2006
@@ -157,6 +157,18 @@
 %%DATADIR%%/sound/offline.wav
 %%DATADIR%%/sound/online.wav
 %%DATADIR%%/sound/send.wav
+%%GENTOO%%%%DATADIR%%/iconsets/roster/default/indicator.png
+%%GENTOO%%%%DATADIR%%/iconsets/system/default/clients/wpk.png
+%%GENTOO%%%%DATADIR%%/iconsets/system/default/clients/gajim.png
+%%GENTOO%%%%DATADIR%%/iconsets/system/default/clients/konnekt.png
+%%GENTOO%%%%DATADIR%%/iconsets/system/default/clients/tlen.png
+%%GENTOO%%%%DATADIR%%/iconsets/system/default/bookmark.png
+%%GENTOO%%%%DATADIR%%/iconsets/system/default/muc_affil_editor.png
+%%GENTOO%%%%DATADIR%%/iconsets/system/default/muc_destroy_room.png
+%%GENTOO%%%%DATADIR%%/iconsets/system/default/edittrash.png
+%%GENTOO%%%%DATADIR%%/iconsets/system/default/edit.png
+%%GENTOO%%%%DATADIR%%/iconsets/system/default/emergencyStatusNo.png
+%%GENTOO%%%%DATADIR%%/iconsets/system/default/emergencyStatusYes.png
 share/applications/psi.desktop
 share/icons/hicolor/16x16/apps/psi.png
 share/icons/hicolor/32x32/apps/psi.png
----- End psi.diff -----
Comment 1 Andrey Slusar freebsd_committer 2006-05-26 19:43:36 UTC
Responsible Changed
From-To: freebsd-ports-bugs->anray

I'll take it.
Comment 2 Andrey Slusar freebsd_committer 2006-05-27 08:01:09 UTC
State Changed
From-To: open->closed

Committed. Thanks!