aboutsummaryrefslogtreecommitdiffstats
path: root/x11/decurs
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2014-04-23 21:37:58 +0800
committerdanfe <danfe@FreeBSD.org>2014-04-23 21:37:58 +0800
commitec1929d507d88a5f03509b3a85d7ddc27ce5bb1a (patch)
tree446e5c3bb7255499bdb3d476819b33a95e2c120e /x11/decurs
parent6b5ab23d331edc921e9cb72d990b714294be11dd (diff)
downloadfreebsd-ports-gnome-ec1929d507d88a5f03509b3a85d7ddc27ce5bb1a.tar.gz
freebsd-ports-gnome-ec1929d507d88a5f03509b3a85d7ddc27ce5bb1a.tar.zst
freebsd-ports-gnome-ec1929d507d88a5f03509b3a85d7ddc27ce5bb1a.zip
- Define LICENSE (GPLv2), reword COMMENT line
- Take maintainership, undeprecate, and stagify - Unbreak on !i386
Diffstat (limited to 'x11/decurs')
-rw-r--r--x11/decurs/Makefile36
-rw-r--r--x11/decurs/files/patch-src-cppstring.cc35
2 files changed, 49 insertions, 22 deletions
diff --git a/x11/decurs/Makefile b/x11/decurs/Makefile
index a99cda6347cf..e8d4523ce586 100644
--- a/x11/decurs/Makefile
+++ b/x11/decurs/Makefile
@@ -8,39 +8,31 @@ CATEGORIES= x11
MASTER_SITES= http://freebsd.nsu.ru/distfiles/ \
#http://varg.dyndns.org/psi/files/
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Lets you edit your X11 mouse cursors
+MAINTAINER= danfe@FreeBSD.org
+COMMENT= Simple X11 mouse cursor editor
-LIB_DEPENDS= libgtkmm-2.0.6.so:${PORTSDIR}/x11-toolkits/gtkmm20
+LICENSE= GPLv2
-DEPRECATED= Abandonware, not staged
-EXPIRATION_DATE= 2014-04-24
+LIB_DEPENDS= libgtkmm-2.0.so:${PORTSDIR}/x11-toolkits/gtkmm20
+USES= dos2unix pkgconfig
+DOS2UNIX_FILES= src/cppstring.cc
USE_XORG= x11
USE_GNOME= gtk20
GNU_CONFIGURE= yes
-USES= pkgconfig
-
-NO_STAGE= yes
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} != "i386"
-BROKEN= Does not compile on !i386
-.endif
post-patch:
@${SED} -e 's:%%PREFIX%%:${PREFIX}:g' \
${FILESDIR}/decurs.exec > ${WRKSRC}/decurs.exec
-# Hacks for contemporary GCC
- @${REINPLACE_CMD} -e 's/CppString \&str/const &/' \
- ${WRKSRC}/src/cppstring.cc ${WRKSRC}/src/cppstring.hh
@${REINPLACE_CMD} -E 's/^\/\/ friend// ; \
- s/([^:])ostream/\1std::ostream/g' ${WRKSRC}/src/cppstring.hh
+ s/([^:])ostream/\1std::ostream/g ; \
+ s/CppString \&str/const &/' ${WRKSRC}/src/cppstring.hh
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/src/decurs ${PREFIX}/bin/decurs.bin
- ${INSTALL_SCRIPT} ${WRKSRC}/decurs.exec ${PREFIX}/bin/decurs
- @${MKDIR} ${DATADIR}
- ${INSTALL_DATA} ${WRKSRC}/fonts/*.bdf ${DATADIR}
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/decurs \
+ ${STAGEDIR}${PREFIX}/bin/decurs.bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/decurs.exec ${STAGEDIR}${PREFIX}/bin/decurs
+ @${MKDIR} ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/fonts/*.bdf ${STAGEDIR}${DATADIR}
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/x11/decurs/files/patch-src-cppstring.cc b/x11/decurs/files/patch-src-cppstring.cc
new file mode 100644
index 000000000000..f632a69a8d97
--- /dev/null
+++ b/x11/decurs/files/patch-src-cppstring.cc
@@ -0,0 +1,35 @@
+--- src/cppstring.cc.orig 2003-05-01 07:42:11 +0800
++++ src/cppstring.cc
+@@ -7,7 +7,7 @@
+ // #include <except.h>
+ #define DEF_BUFFER_SIZE 512
+ #define CPPSTRING_ERROR(obj,msg,retval) {obj<<"*** ERROR *** : "<<msg<<std::endl;return retval;}
+-std::ostream& operator<<(std::ostream &cou, CppString &str)
++std::ostream& operator<<(std::ostream &cou, const CppString &str)
+ {
+ return (cou << str.our_string);
+ }
+@@ -25,7 +25,7 @@ CppString::~CppString()
+ {
+ Clean();
+ }
+-CppString::CppString(CppString &str) : our_string(0)
++CppString::CppString(const CppString &str) : our_string(0)
+ {
+ Clean();
+ (*this)=str.c_str();
+@@ -411,10 +411,12 @@ bool CppString::Contains(char ch) const
+ CppString& CppString::format(const char *fstr, ...)
+ {
+ char *buffer=new char[0x1000]; // 4096
+- char *args=(char*)&fstr+sizeof(fstr);
+- vsprintf(buffer,fstr,args);
++ va_list args;
++ va_start(args,fstr);
++ vsnprintf(buffer,sizeof(buffer),fstr,args);
+ (*this)=buffer;
+ delete[]buffer;
++ va_end(args);
+ return *this;
+ }
+ // #include <iostream.h>