Bug 184859 - x11-wm/ede: Fix build with clang
x11-wm/ede: Fix build with clang
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: Antoine Brodin
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-16 18:10 UTC by tkato432
Modified: 2014-01-05 20:01 UTC (History)
0 users

See Also:


Attachments
file.diff (5.83 KB, patch)
2013-12-16 18:10 UTC, tkato432
no flags Details | Diff
x11-wm_ede.diff (5.88 KB, patch)
2014-01-05 08:57 UTC, tkato432
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tkato432 2013-12-16 18:10:16 UTC
- Fix build with clang

New file:
files/patch-pekwm__Observabe.cc
files/patch-pekwm__Observabe.hh
Comment 1 tkato432 2014-01-05 08:57:22 UTC
Remake of the patch against current tree.
Comment 2 Antoine Brodin freebsd_committer 2014-01-05 12:00:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->antoine

Take
Comment 3 dfilter freebsd_committer 2014-01-05 19:44:07 UTC
Author: antoine
Date: Sun Jan  5 19:43:58 2014
New Revision: 338818
URL: http://svnweb.freebsd.org/changeset/ports/338818

Log:
  Fix build with clang
  
  PR:		ports/184859
  Submitted by:	KATO Tsuguru

Added:
  head/x11-wm/ede/files/
  head/x11-wm/ede/files/patch-pekwm__Observable.cc   (contents, props changed)
  head/x11-wm/ede/files/patch-pekwm__Observable.hh   (contents, props changed)
Modified:
  head/x11-wm/ede/Makefile
  head/x11-wm/ede/pkg-plist

Modified: head/x11-wm/ede/Makefile
==============================================================================
--- head/x11-wm/ede/Makefile	Sun Jan  5 19:17:03 2014	(r338817)
+++ head/x11-wm/ede/Makefile	Sun Jan  5 19:43:58 2014	(r338818)
@@ -3,7 +3,7 @@
 
 PORTNAME=	ede
 PORTVERSION=	2.0
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	x11-wm
 MASTER_SITES=	SF \
 		SF/${PORTNAME}/${PORTNAME}lib/${PORTVERSION}:edelib
@@ -16,21 +16,19 @@ COMMENT=	Equinox Desktop Environment
 LICENSE=	GPLv2 LGPL20
 LICENSE_COMB=	multi
 
-BUILD_DEPENDS=	python:${PORTSDIR}/lang/python \
-		doxygen:${PORTSDIR}/devel/doxygen \
+BUILD_DEPENDS=	doxygen:${PORTSDIR}/devel/doxygen \
 		jam:${PORTSDIR}/devel/jam \
-		update-mime-database:${PORTSDIR}/misc/shared-mime-info
-LIB_DEPENDS=	dbus-1.3:${PORTSDIR}/devel/dbus \
-		curl:${PORTSDIR}/ftp/curl \
-		startup-notification-1.0:${PORTSDIR}/x11/startup-notification \
-		fltk.1:${PORTSDIR}/x11-toolkits/fltk
-RUN_DEPENDS=	update-mime-database:${PORTSDIR}/misc/shared-mime-info
+		python:${PORTSDIR}/lang/python
+LIB_DEPENDS=	libdbus-1.so:${PORTSDIR}/devel/dbus \
+		libcurl.so:${PORTSDIR}/ftp/curl \
+		libstartup-notification-1.so:${PORTSDIR}/x11/startup-notification \
+		libfltk.so:${PORTSDIR}/x11-toolkits/fltk
 
 OPTIONS_DEFINE=	HAL
 HAL_DESC=	Enable HAL support
 
+USES=		fam iconv gettext pathfix pkgconfig shared-mime-info
 USE_XORG=	xcomposite xft xinerama xpm xrandr
-USES=		fam gettext pathfix pkgconfig
 USE_PYTHON=	yes
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--with-edelib_path=${EDELIB_WRKSRC} \
@@ -52,15 +50,16 @@ EDELIB_WRKSRC=	${WRKDIR}/${EDELIB_DISTNA
 HAL_LIB_DEPENDS=	libhal.so.1:${PORTSDIR}/sysutils/hal
 HAL_CONFIGURE_OFF=	--disable-hal
 
-# use multiple make jobs
-_make_jobs=	-j${MAKE_JOBS_NUMBER}
-
-NO_STAGE=	yes
 post-patch:
 	@${REINPLACE_CMD} -e \
 		's|/usr/local/share|${LOCALBASE}/share| ; \
 		 /OPTIM_FLAGS=/s|-O2|-fPIC| ; \
 		 s|_daylight=yes|_daylight=no|' ${EDELIB_WRKSRC}/configure
+	@${REINPLACE_CMD} -e \
+		's| -liconv| ${ICONV_LIB}|' ${WRKSRC}/configure
+	@${REINPLACE_CMD} -e \
+		's|$$(CC)|@CXX@| ; \
+		 s|-lstdc++||' ${WRKSRC}/Jamconfig.in
 
 pre-configure:
 	@(cd ${EDELIB_WRKSRC} \
@@ -74,14 +73,25 @@ pre-configure:
 
 pre-build:
 	@(cd ${EDELIB_WRKSRC} \
-		&& ${LOCALBASE}/bin/jam ${_make_jobs} \
+		&& ${LOCALBASE}/bin/jam -j${MAKE_JOBS_NUMBER} \
 		&& ${LOCALBASE}/bin/jam ${INSTALL_TARGET})
 
 do-build:
-	@(cd ${BUILD_WRKSRC} && ${LOCALBASE}/bin/jam ${_make_jobs})
+	@(cd ${BUILD_WRKSRC} && ${LOCALBASE}/bin/jam -j${MAKE_JOBS_NUMBER})
 
 do-install:
-	@(cd ${INSTALL_WRKSRC} && ${LOCALBASE}/bin/jam ${INSTALL_TARGET})
-	@-update-mime-database ${PREFIX}/share/mime
+	@(cd ${INSTALL_WRKSRC} && ${SETENV} DESTDIR="${STAGEDIR}" \
+		${LOCALBASE}/bin/jam ${INSTALL_TARGET})
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/doc/ede-2.0.0/manual/images
+	@(cd ${WRKSRC}/doc/manual/images && ${COPYTREE_SHARE} . \
+		${STAGEDIR}${PREFIX}/share/doc/ede-2.0.0/manual/images)
+.for i in ede-about ede-autostart ede-bell-conf ede-bug-report ede-crasher \
+	ede-calc ede-conf ede-desktop ede-desktop-conf ede-dialog \
+	ede-keyboard-conf ede-notify-daemon ede-screensaver-conf \
+	ede-image-view ede-launch emountd ede-timedate ede-tip \
+	ede-tip-compiler ede-preferred-applications evoke ede-shutdown \
+	ede-panel ede-menu-spec-test pekwm
+	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${i}
+.endfor
 
 .include <bsd.port.mk>

Added: head/x11-wm/ede/files/patch-pekwm__Observable.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-wm/ede/files/patch-pekwm__Observable.cc	Sun Jan  5 19:43:58 2014	(r338818)
@@ -0,0 +1,50 @@
+--- ./pekwm/Observable.cc.orig	2012-05-18 12:51:49.000000000 +0000
++++ ./pekwm/Observable.cc	2014-01-05 16:56:43.000000000 +0000
+@@ -10,10 +10,12 @@
+ #include "config.h"
+ #endif // HAVE_CONFIG_H
+ 
++#include <algorithm>
++
+ #include "Observable.hh"
+ #include "Observer.hh"
+ 
+-using SLIST_NAMESPACE::slist;
++using std::vector;
+ 
+ /**
+  * Notify all observers.
+@@ -21,11 +23,10 @@
+ void
+ Observable::notifyObservers(Observation *observation)
+ {
+-    if (_observers.size()) {
+-        slist<Observer*>::iterator it(_observers.begin());
+-        for (; it != _observers.end(); ++it) {
+-            (*it)->notify(this, observation);
+-        }
++    vector<Observer*>::const_iterator it(_observers.begin());
++    vector<Observer*>::const_iterator end(_observers.end());
++    for (; it != end; ++it) {
++        (*it)->notify(this, observation);
+     }
+ }
+ 
+@@ -35,7 +36,7 @@
+ void
+ Observable::addObserver(Observer *observer)
+ {
+-    _observers.push_front(observer);
++    _observers.push_back(observer);
+ }
+ 
+ /**
+@@ -44,7 +45,5 @@
+ void
+ Observable::removeObserver(Observer *observer)
+ {
+-    if (_observers.size()) {
+-        _observers.remove(observer);
+-    }
++    _observers.erase(std::remove(_observers.begin(), _observers.end(), observer), _observers.end());
+ }

Added: head/x11-wm/ede/files/patch-pekwm__Observable.hh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-wm/ede/files/patch-pekwm__Observable.hh	Sun Jan  5 19:43:58 2014	(r338818)
@@ -0,0 +1,24 @@
+--- ./pekwm/Observable.hh.orig	2012-05-18 12:51:49.000000000 +0000
++++ ./pekwm/Observable.hh	2014-01-05 16:56:43.000000000 +0000
+@@ -9,11 +9,7 @@
+ #ifndef _OBSERVABLE_HH_
+ #define _OBSERVABLE_HH_
+ 
+-#ifdef HAVE_SLIST
+-#include <slist>
+-#else // HAVE_EXT_SLIST
+-#include <ext/slist>
+-#endif // HAVE_SLIST
++#include <vector>
+ 
+ class Observer;
+ 
+@@ -36,7 +32,7 @@
+     void removeObserver(Observer *observer); 
+ 
+ private:
+-    SLIST_NAMESPACE::slist<Observer*> _observers; /**< List of observers. */
++    std::vector<Observer*> _observers; /**< List of observers. */
+ };
+ 
+ #endif // _OBSERVABLE_HH_

Modified: head/x11-wm/ede/pkg-plist
==============================================================================
--- head/x11-wm/ede/pkg-plist	Sun Jan  5 19:17:03 2014	(r338817)
+++ head/x11-wm/ede/pkg-plist	Sun Jan  5 19:43:58 2014	(r338818)
@@ -1555,5 +1555,3 @@ share/xsessions/ede.desktop
 @dirrm etc/xdg/ede
 @dirrmtry etc/xdg
 @dirrm etc/pekwm
-@exec %%LOCALBASE%%/bin/update-mime-database %D/share/mime
-@unexec %%LOCALBASE%%/bin/update-mime-database %D/share/mime
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 dfilter freebsd_committer 2014-01-05 19:52:28 UTC
Author: antoine
Date: Sun Jan  5 19:52:20 2014
New Revision: 338820
URL: http://svnweb.freebsd.org/changeset/ports/338820

Log:
  MFH: r338818
  
  Fix build with clang
  
  PR:		ports/184859
  Submitted by:	KATO Tsuguru
  Approved by:	portmgr (implicit)

Added:
  branches/2014Q1/x11-wm/ede/files/
     - copied from r338818, head/x11-wm/ede/files/
Modified:
  branches/2014Q1/x11-wm/ede/Makefile
  branches/2014Q1/x11-wm/ede/pkg-plist
Directory Properties:
  branches/2014Q1/   (props changed)

Modified: branches/2014Q1/x11-wm/ede/Makefile
==============================================================================
--- branches/2014Q1/x11-wm/ede/Makefile	Sun Jan  5 19:44:38 2014	(r338819)
+++ branches/2014Q1/x11-wm/ede/Makefile	Sun Jan  5 19:52:20 2014	(r338820)
@@ -3,7 +3,7 @@
 
 PORTNAME=	ede
 PORTVERSION=	2.0
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	x11-wm
 MASTER_SITES=	SF \
 		SF/${PORTNAME}/${PORTNAME}lib/${PORTVERSION}:edelib
@@ -16,21 +16,19 @@ COMMENT=	Equinox Desktop Environment
 LICENSE=	GPLv2 LGPL20
 LICENSE_COMB=	multi
 
-BUILD_DEPENDS=	python:${PORTSDIR}/lang/python \
-		doxygen:${PORTSDIR}/devel/doxygen \
+BUILD_DEPENDS=	doxygen:${PORTSDIR}/devel/doxygen \
 		jam:${PORTSDIR}/devel/jam \
-		update-mime-database:${PORTSDIR}/misc/shared-mime-info
-LIB_DEPENDS=	dbus-1.3:${PORTSDIR}/devel/dbus \
-		curl:${PORTSDIR}/ftp/curl \
-		startup-notification-1.0:${PORTSDIR}/x11/startup-notification \
-		fltk.1:${PORTSDIR}/x11-toolkits/fltk
-RUN_DEPENDS=	update-mime-database:${PORTSDIR}/misc/shared-mime-info
+		python:${PORTSDIR}/lang/python
+LIB_DEPENDS=	libdbus-1.so:${PORTSDIR}/devel/dbus \
+		libcurl.so:${PORTSDIR}/ftp/curl \
+		libstartup-notification-1.so:${PORTSDIR}/x11/startup-notification \
+		libfltk.so:${PORTSDIR}/x11-toolkits/fltk
 
 OPTIONS_DEFINE=	HAL
 HAL_DESC=	Enable HAL support
 
+USES=		iconv gettext pathfix pkgconfig shared-mime-info
 USE_XORG=	xcomposite xft xinerama xpm xrandr
-USES=	pathfix gettext pkgconfig
 USE_PYTHON=	yes
 USE_FAM=	yes
 GNU_CONFIGURE=	yes
@@ -53,15 +51,16 @@ EDELIB_WRKSRC=	${WRKDIR}/${EDELIB_DISTNA
 HAL_LIB_DEPENDS=	libhal.so.1:${PORTSDIR}/sysutils/hal
 HAL_CONFIGURE_OFF=	--disable-hal
 
-# use multiple make jobs
-_make_jobs=	-j${MAKE_JOBS_NUMBER}
-
-NO_STAGE=	yes
 post-patch:
 	@${REINPLACE_CMD} -e \
 		's|/usr/local/share|${LOCALBASE}/share| ; \
 		 /OPTIM_FLAGS=/s|-O2|-fPIC| ; \
 		 s|_daylight=yes|_daylight=no|' ${EDELIB_WRKSRC}/configure
+	@${REINPLACE_CMD} -e \
+		's| -liconv| ${ICONV_LIB}|' ${WRKSRC}/configure
+	@${REINPLACE_CMD} -e \
+		's|$$(CC)|@CXX@| ; \
+		 s|-lstdc++||' ${WRKSRC}/Jamconfig.in
 
 pre-configure:
 	@(cd ${EDELIB_WRKSRC} \
@@ -75,14 +74,25 @@ pre-configure:
 
 pre-build:
 	@(cd ${EDELIB_WRKSRC} \
-		&& ${LOCALBASE}/bin/jam ${_make_jobs} \
+		&& ${LOCALBASE}/bin/jam -j${MAKE_JOBS_NUMBER} \
 		&& ${LOCALBASE}/bin/jam ${INSTALL_TARGET})
 
 do-build:
-	@(cd ${BUILD_WRKSRC} && ${LOCALBASE}/bin/jam ${_make_jobs})
+	@(cd ${BUILD_WRKSRC} && ${LOCALBASE}/bin/jam -j${MAKE_JOBS_NUMBER})
 
 do-install:
-	@(cd ${INSTALL_WRKSRC} && ${LOCALBASE}/bin/jam ${INSTALL_TARGET})
-	@-update-mime-database ${PREFIX}/share/mime
+	@(cd ${INSTALL_WRKSRC} && ${SETENV} DESTDIR="${STAGEDIR}" \
+		${LOCALBASE}/bin/jam ${INSTALL_TARGET})
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/doc/ede-2.0.0/manual/images
+	@(cd ${WRKSRC}/doc/manual/images && ${COPYTREE_SHARE} . \
+		${STAGEDIR}${PREFIX}/share/doc/ede-2.0.0/manual/images)
+.for i in ede-about ede-autostart ede-bell-conf ede-bug-report ede-crasher \
+	ede-calc ede-conf ede-desktop ede-desktop-conf ede-dialog \
+	ede-keyboard-conf ede-notify-daemon ede-screensaver-conf \
+	ede-image-view ede-launch emountd ede-timedate ede-tip \
+	ede-tip-compiler ede-preferred-applications evoke ede-shutdown \
+	ede-panel ede-menu-spec-test pekwm
+	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${i}
+.endfor
 
 .include <bsd.port.mk>

Modified: branches/2014Q1/x11-wm/ede/pkg-plist
==============================================================================
--- branches/2014Q1/x11-wm/ede/pkg-plist	Sun Jan  5 19:44:38 2014	(r338819)
+++ branches/2014Q1/x11-wm/ede/pkg-plist	Sun Jan  5 19:52:20 2014	(r338820)
@@ -1555,5 +1555,3 @@ share/xsessions/ede.desktop
 @dirrm etc/xdg/ede
 @dirrmtry etc/xdg
 @dirrm etc/pekwm
-@exec %%LOCALBASE%%/bin/update-mime-database %D/share/mime
-@unexec %%LOCALBASE%%/bin/update-mime-database %D/share/mime
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Antoine Brodin freebsd_committer 2014-01-05 20:00:37 UTC
State Changed
From-To: open->closed

Patch committed to head and 2014Q1, thanks!