ports/57458: [PATCH] to fix editors/scite link error
Rui Lopes
rui at ruilopes.com
Wed Oct 1 15:10:31 UTC 2003
>Number: 57458
>Category: ports
>Synopsis: [PATCH] to fix editors/scite link error
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Oct 01 08:10:27 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Rui Lopes
>Release: FreeBSD 5.1-RELEASE-p5 i386
>Organization:
>Environment:
System: FreeBSD disty 5.1-RELEASE-p5 FreeBSD 5.1-RELEASE-p5 #2: Mon Sep 22 12:24:38 WEST 2003 root at disty:/usr/obj/usr/src/sys/DEBUGGER i386
>Description:
The port does not link.
It gives a lot of linking errors like these:
cc `pkg-config --libs gtk+ gthread` -lscintilla -lscintilla_lexers -DGTK SciTEGTK.o SciTEBase.o SciTEBuffers.o SciTEIO.o Exporters.o DirectorExtension.o SciTEProps.o Utf8_16.o -o ../bin/SciTE
SciTEGTK.o: In function `SciTEGTK::AddMBButton(_GtkWidget*, char const*, int, _GtkAccelGroup*, bool)':
SciTEGTK.o(.text+0xa59): undefined reference to `operator delete[](void*)'
SciTEGTK.o(.text+0xa66): undefined reference to `operator delete[](void*)'
SciTEGTK.o(.text+0xa9a): undefined reference to `operator delete[](void*)'
I also added a WITH_GNOME knob, with this set the port installs a launcher
under gnome "Programming" menu.
>How-To-Repeat:
Just try to build the port.
>Fix:
The fix is to use the C++ compiler.
NOTE: Probably it would be more correct to generate pkg-plist at runtime.
--- scite.patch begins here ---
diff -u scite.orig/Makefile scite/Makefile
--- scite.orig/Makefile Wed Oct 1 15:30:04 2003
+++ scite/Makefile Wed Oct 1 15:32:48 2003
@@ -24,20 +24,37 @@
USE_X_PREFIX= yes
USE_GMAKE= yes
MAKEFILE= makefile
+PLIST_SUB= GNOME_COMMENT=${GNOME_COMMENT}
-.if defined(WITH_GTK2)
+.if defined(WITH_GNOME)
+USE_GNOME= gtk20 gnomeprefix
+PKGNAMESUFFIX= -gnome
+GNOME_COMMENT= ''
+.elif defined(WITH_GTK2)
USE_GNOME= gtk20
PKGNAMESUFFIX= -gtk2
.else
USE_GNOME= gtk12
MAKE_ARGS= GTK1=yes
.endif
+GNOME_COMMENT?= '@comment '
+
+post-patch:
+ @${REINPLACE_CMD} -e 's,$$(CC),$$(CXX),g' ${WRKSRC}/makefile
+.if defined(WITH_GNOME)
+ @${TR} -d "\r" < ${WRKSRC}/SciTE.desktop > ${WRKDIR}/SciTE.desktop
+ @${ECHO_CMD} 'Categories=Application;Development;' >> ${WRKDIR}/SciTE.desktop
+.endif
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/../bin/SciTE ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/../doc/scite.1 ${MANPREFIX}/man/man1
@${MKDIR} ${DATADIR}
${INSTALL_DATA} ${WRKSRC}/../src/*.properties ${DATADIR}
+.if defined(WITH_GNOME)
+ ${INSTALL_DATA} ${WRKDIR}/SciTE.desktop ${PREFIX}/share/gnome/applications
+ ${INSTALL_DATA} ${WRKSRC}/Sci48M.png ${PREFIX}/share/gnome/pixmaps
+.endif
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/../doc/*.html ${DOCSDIR}
Common subdirectories: scite.orig/files and scite/files
diff -u scite.orig/pkg-plist scite/pkg-plist
--- scite.orig/pkg-plist Wed Oct 1 15:30:04 2003
+++ scite/pkg-plist Wed Oct 1 15:27:49 2003
@@ -1,4 +1,6 @@
bin/SciTE
+%%GNOME_COMMENT%%share/gnome/applications/SciTE.desktop
+%%GNOME_COMMENT%%share/gnome/pixmaps/Sci48M.png
%%PORTDOCS%%%%DOCSDIR%%/PrintHi.png
%%PORTDOCS%%%%DOCSDIR%%/SciBreak2.jpg
%%PORTDOCS%%%%DOCSDIR%%/SciTE.html
--- scite.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list