From 2ff55b4bb24ae705dee2830d8488971021ca5714 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Mon, 4 May 2015 11:17:21 +0000 Subject: [PATCH] devel/upp: update to 8227 and improve - Adapt MASTER_SITES - Adapt MACRO_FLAGS - Adapt include directories for CINC - Adapt sed patches - Adapt GCC build method - Add LICENSE_FILE - Add execinfo to USES - Add creation of CLANG build method, based on GCC with some changes - Add patch to build U++ package(s) using modern GCC [1] - Add patch to delete *.bm files for local install, not just GCC.bm [2] - Add patches for some U++ packages to compile on FreeBSD [3] - Do not copy (unused) empty directories to DATADIR - Wrap cd related command to parentheses Changes: http://upp.sf.net/www$uppweb$Roadmap$en-us.html PR: 198359 Submitted by: lightside Approved by: m.sund@arcor.de (maintainer) Obtained from: https://code.google.com/p/upp-mirror/source/detail?r=8242 [1] Obtained from: https://code.google.com/p/upp-mirror/source/detail?r=8251 [2] Obtained from: https://code.google.com/p/upp-mirror/source/detail?r=8267 [3] Obtained from: https://code.google.com/p/upp-mirror/source/detail?r=8268 [3] --- devel/upp/Makefile | 46 +++++++++---------- devel/upp/distinfo | 4 +- .../files/patch-bazaar_FreeType_FreeType.upp | 8 ++++ devel/upp/files/patch-bazaar_Media_Media.upp | 11 +++++ devel/upp/files/patch-bazaar_Tcc_Tcc.upp | 14 ++++++ devel/upp/files/patch-uppsrc_Core_Defs.h | 11 +++++ .../patch-uppsrc_PostgreSQL_PostgreSQL.upp | 11 +++++ .../patch-uppsrc_ide_SrcUpdater_Install.cpp | 16 +++++++ 8 files changed, 96 insertions(+), 25 deletions(-) create mode 100644 devel/upp/files/patch-bazaar_FreeType_FreeType.upp create mode 100644 devel/upp/files/patch-bazaar_Media_Media.upp create mode 100644 devel/upp/files/patch-bazaar_Tcc_Tcc.upp create mode 100644 devel/upp/files/patch-uppsrc_Core_Defs.h create mode 100644 devel/upp/files/patch-uppsrc_PostgreSQL_PostgreSQL.upp create mode 100644 devel/upp/files/patch-uppsrc_ide_SrcUpdater_Install.cpp diff --git a/devel/upp/Makefile b/devel/upp/Makefile index 3a74ab0319de..de03b49d70b1 100644 --- a/devel/upp/Makefile +++ b/devel/upp/Makefile @@ -2,29 +2,29 @@ # $FreeBSD$ PORTNAME= upp -PORTVERSION= 5485 -PORTREVISION= 2 +PORTVERSION= 8227 CATEGORIES= devel x11-toolkits -MASTER_SITES= SF +MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/2015.1/ DISTNAME= ${PORTNAME}-x11-src-${PORTVERSION} MAINTAINER= m.sund@arcor.de COMMENT= Ultimate++, a BSD-licensed, cross-platform, C/C++ RAD suite LICENSE= BSD2CLAUSE +LICENSE_FILE= ${BUILD_WRKSRC}/Core/Copying LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2 \ libexpat.so:${PORTSDIR}/textproc/expat2 \ libnotify.so:${PORTSDIR}/devel/libnotify -USES= gmake +USES= execinfo gmake USE_XORG= xft USE_GNOME= gtk20 WRKSRC= ${WRKDIR}/${DISTNAME} BUILD_WRKSRC= ${WRKSRC}/uppsrc -MACRO_FLAGS= -DflagGUI -DflagGCC -DflagSHARED -DflagPOSIX -DflagBSD -DflagFREEBSD +MACRO_FLAGS= -DflagGUI -DflagMT -DflagGCC -DflagSHARED -DflagPOSIX -DflagBSD -DflagFREEBSD MAKE_ARGS= UPPOUT="../_out/" OutFile="../theide" \ Macro="${MACRO_FLAGS}" \ @@ -33,10 +33,9 @@ MAKE_ARGS= UPPOUT="../_out/" OutFile="../theide" \ -I${LOCALBASE}/include/gtk-2.0 -I${LOCALBASE}/include/atk-1.0 \ -I${LOCALBASE}/include/cairo -I${LOCALBASE}/include/gdk-pixbuf-2.0 \ -I${LOCALBASE}/include/pango-1.0 -I${LOCALBASE}/include/glib-2.0 \ - -I${LOCALBASE}/lib/glib-2.0/include \ - -I${LOCALBASE}/include/libpng -I/usr/include" + -I${LOCALBASE}/lib/glib-2.0/include -I/usr/include" -PORTDATA= bazaar examples reference tutorial uppsrc GCC.bm +PORTDATA= bazaar examples reference tutorial uppsrc *.bm DESKTOP_ENTRIES="TheIDE" "IDE for cross-platform C++ development" \ "${DATADIR}/uppsrc/ide/theide-48.png" "theide" \ @@ -62,13 +61,12 @@ MACRO_FLAGS+= -DflagUSEMALLOC BROKEN= Does not compile on ia64, powerpc, or sparc64 .endif -pre-build: .SILENT +post-patch: .SILENT ${MV} ${BUILD_WRKSRC}/Makefile.in ${BUILD_WRKSRC}/Makefile - ${REINPLACE_CMD} -e '/^CC =/d;/^CFLAGS =/d;/^CXXFLAGS =/d;/^LDFLAGS =/d' \ - -e 's|$$(CC)|$$(CXX)|' \ - -e 's|-Linux-|-BSD-FreeBSD-|' \ - -e 's|-ldl|-lXau -lXdmcp -lfreetype -lexpat -lxcb -lpng|' \ - ${BUILD_WRKSRC}/Makefile + ${REINPLACE_CMD} -e '/^CXX =/d;/^CFLAGS =/d;/^CXXFLAGS =/d;/^LDFLAGS =/d' \ + -e 's|-Linux-|-BSD-FreeBSD-|' \ + -e 's|-ldl|-lXau -lXdmcp -lfreetype -lexpat -lxcb -lpng -lexecinfo|' \ + ${BUILD_WRKSRC}/Makefile post-build: .SILENT ${ECHO_CMD} "BUILDER = \"GCC\"" > ${WRKSRC}/GCC.bm @@ -80,21 +78,23 @@ post-build: .SILENT ${ECHO_CMD} "DEBUG_LINK = \"\";" >> ${WRKSRC}/GCC.bm ${ECHO_CMD} "RELEASE_BLITZ = \"0\";" >> ${WRKSRC}/GCC.bm ${ECHO_CMD} "RELEASE_LINKMODE = \"1\";" >> ${WRKSRC}/GCC.bm - ${ECHO_CMD} "RELEASE_OPTIONS = \"-O2 -ffunction-sections\";" >> ${WRKSRC}/GCC.bm - ${ECHO_CMD} "RELEASE_SIZE_OPTIONS = \"-Os -finline-limit=20 -ffunction-sections\";" >> ${WRKSRC}/GCC.bm + ${ECHO_CMD} "RELEASE_OPTIONS = \"-O2 -ffunction-sections -fdata-sections\";" >> ${WRKSRC}/GCC.bm + ${ECHO_CMD} "RELEASE_SIZE_OPTIONS = \"-Os -finline-limit=20 -ffunction-sections -fdata-sections\";" >> ${WRKSRC}/GCC.bm + ${ECHO_CMD} "RELEASE_FLAGS = \"\";" >> ${WRKSRC}/GCC.bm + ${ECHO_CMD} "RELEASE_LINK = \"-Wl,--gc-sections\";" >> ${WRKSRC}/GCC.bm ${ECHO_CMD} "DEBUGGER = \"gdb\";" >> ${WRKSRC}/GCC.bm ${ECHO_CMD} "PATH = \"\";" >> ${WRKSRC}/GCC.bm - ${ECHO_CMD} "INCLUDE = \"${LOCALBASE}/include;${LOCALBASE}/include/freetype2;${LOCALBASE}/include/gtk-2.0;${LOCALBASE}/include/atk-1.0;${LOCALBASE}/include/cairo;${LOCALBASE}/include/gdk-pixbuf-2.0;${LOCALBASE}/include/pango-1.0;${LOCALBASE}/include/glib-2.0;${LOCALBASE}/include/libpng;/usr/include\";" >> ${WRKSRC}/GCC.bm + ${ECHO_CMD} "INCLUDE = \"${LOCALBASE}/include;${LOCALBASE}/include/freetype2;${LOCALBASE}/include/gtk-2.0;${LOCALBASE}/include/atk-1.0;${LOCALBASE}/include/cairo;${LOCALBASE}/include/gdk-pixbuf-2.0;${LOCALBASE}/include/pango-1.0;${LOCALBASE}/include/glib-2.0;${LOCALBASE}/lib/glib-2.0/include;/usr/include\";" >> ${WRKSRC}/GCC.bm ${ECHO_CMD} "LIB = \"${LOCALBASE}/lib;/usr/lib\";" >> ${WRKSRC}/GCC.bm - ${ECHO_CMD} "REMOTE_HOST = \"\";" >> ${WRKSRC}/GCC.bm - ${ECHO_CMD} "REMOTE_OS = \"\";" >> ${WRKSRC}/GCC.bm - ${ECHO_CMD} "REMOTE_TRANSFER = \"\";" >> ${WRKSRC}/GCC.bm - ${ECHO_CMD} "REMOTE_MAP = \"\";" >> ${WRKSRC}/GCC.bm ${ECHO_CMD} "LINKMODE_LOCK = \"0\";" >> ${WRKSRC}/GCC.bm +# Also create CLANG build method, based on GCC with some changes + (cd ${WRKSRC} && ${CP} GCC.bm CLANG.bm && \ + ${SED} -i '' -e '/^BUILDER/s|GCC|CLANG| ; \ + s| -fdata-sections|| ; s| -finline-limit=20||' CLANG.bm) do-install: ${INSTALL_PROGRAM} ${WRKSRC}/theide ${STAGEDIR}${PREFIX}/bin - ${MKDIR} ${STAGEDIR}${DATADIR} - cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDATA}" ${STAGEDIR}${DATADIR} + (cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDATA} -not ( -type d -empty )" \ + ${STAGEDIR}${DATADIR}) .include diff --git a/devel/upp/distinfo b/devel/upp/distinfo index 4edd8354ff3b..00a39611022c 100644 --- a/devel/upp/distinfo +++ b/devel/upp/distinfo @@ -1,2 +1,2 @@ -SHA256 (upp-x11-src-5485.tar.gz) = d6f9c5991c7aceb9df71d5723fd3b591c3201c05b05795eb063bc634dc5a0bb1 -SIZE (upp-x11-src-5485.tar.gz) = 36693193 +SHA256 (upp-x11-src-8227.tar.gz) = 0cbac66dd527d9b05fc279ffb8b53cab1cd67d275f173c95a59b904fd46bb338 +SIZE (upp-x11-src-8227.tar.gz) = 44496813 diff --git a/devel/upp/files/patch-bazaar_FreeType_FreeType.upp b/devel/upp/files/patch-bazaar_FreeType_FreeType.upp new file mode 100644 index 000000000000..9009fcdb5bd4 --- /dev/null +++ b/devel/upp/files/patch-bazaar_FreeType_FreeType.upp @@ -0,0 +1,8 @@ +--- bazaar/FreeType/FreeType.upp.orig 2015-03-02 00:01:02 UTC ++++ bazaar/FreeType/FreeType.upp +@@ -1,4 +1,4 @@ +-options(GCC) "-include \"UppFreetype.h\""; ++options(CLANG | GCC) "-include \"UppFreetype.h\""; + + options(MSC) "-FI \"UppFreetype.h\""; + diff --git a/devel/upp/files/patch-bazaar_Media_Media.upp b/devel/upp/files/patch-bazaar_Media_Media.upp new file mode 100644 index 000000000000..32648b6eef02 --- /dev/null +++ b/devel/upp/files/patch-bazaar_Media_Media.upp @@ -0,0 +1,11 @@ +--- bazaar/Media/Media.upp.orig 2015-03-02 00:01:01 UTC ++++ bazaar/Media/Media.upp +@@ -8,7 +8,7 @@ library(MSC) "avcodec.lib avformat.lib a + + library(GCC WIN32) "avcodec avformat avutil swscale avdevice avcore"; + +-library(GCC !WIN32) "avutil avcodec avformat avdevice swscale"; ++library(POSIX) "avutil avcodec avformat avdevice swscale"; + + link(MSC) /FORCE:MULTIPLE; + diff --git a/devel/upp/files/patch-bazaar_Tcc_Tcc.upp b/devel/upp/files/patch-bazaar_Tcc_Tcc.upp new file mode 100644 index 000000000000..bb5d2dbf6cfd --- /dev/null +++ b/devel/upp/files/patch-bazaar_Tcc_Tcc.upp @@ -0,0 +1,14 @@ +--- bazaar/Tcc/Tcc.upp.orig 2015-03-02 00:01:02 UTC ++++ bazaar/Tcc/Tcc.upp +@@ -3,9 +3,9 @@ description "Tiny C Compiler wrapper\377 + uses + Core; + +-uses(GCC) plugin/tcc; ++uses(CLANG | GCC) plugin/tcc; + +-options(GCC) -DLIBTCC; ++options(POSIX) -DLIBTCC; + + options(WIN32) "-DTCC_TARGET_PE -DLIBTCC"; + diff --git a/devel/upp/files/patch-uppsrc_Core_Defs.h b/devel/upp/files/patch-uppsrc_Core_Defs.h new file mode 100644 index 000000000000..e8bce9751b7d --- /dev/null +++ b/devel/upp/files/patch-uppsrc_Core_Defs.h @@ -0,0 +1,11 @@ +--- uppsrc/Core/Defs.h.orig 2015-01-26 21:00:02 UTC ++++ uppsrc/Core/Defs.h +@@ -337,7 +337,7 @@ inline bool IsInf(double d) { ret + inline bool IsNaN(double d) { return _isnan(d); } + inline bool IsInf(double d) { return !_finite(d) && !_isnan(d); } + #endif +-#elif __APPLE__ || __DragonFly__ ++#elif __APPLE__ || __DragonFly__ || (PLATFORM_BSD && GCC_VERSION >= 40700) + inline bool IsNaN(double d) { return std::isnan(d); } + inline bool IsInf(double d) { return std::isinf(d); } + #else diff --git a/devel/upp/files/patch-uppsrc_PostgreSQL_PostgreSQL.upp b/devel/upp/files/patch-uppsrc_PostgreSQL_PostgreSQL.upp new file mode 100644 index 000000000000..57c5df6f5bba --- /dev/null +++ b/devel/upp/files/patch-uppsrc_PostgreSQL_PostgreSQL.upp @@ -0,0 +1,11 @@ +--- uppsrc/PostgreSQL/PostgreSQL.upp.orig 2015-03-02 00:01:00 UTC ++++ uppsrc/PostgreSQL/PostgreSQL.upp +@@ -9,7 +9,7 @@ library(WIN32 !NOPOSTGRESQL MSC) libpq; + + library(WIN32 !NOPOSTGRESQL GCC) pq; + +-library(LINUX !NOPOSTGRESQL) pq; ++library(POSIX !NOPOSTGRESQL) pq; + + file + PostgreSQL.h, diff --git a/devel/upp/files/patch-uppsrc_ide_SrcUpdater_Install.cpp b/devel/upp/files/patch-uppsrc_ide_SrcUpdater_Install.cpp new file mode 100644 index 000000000000..365b15aa7fc8 --- /dev/null +++ b/devel/upp/files/patch-uppsrc_ide_SrcUpdater_Install.cpp @@ -0,0 +1,16 @@ +--- uppsrc/ide/SrcUpdater/Install.cpp.orig 2012-08-31 12:10:00 UTC ++++ uppsrc/ide/SrcUpdater/Install.cpp +@@ -282,7 +282,12 @@ void InstallWizard::Perform(){ + if(!CopyFolder(UpdaterCfg().localsrc,UpdaterCfg().globalsrc,&p)){ + Exclamation(DeQtf("Failed to copy "+UpdaterCfg().globalsrc+" to "+UpdaterCfg().localsrc)); + } +- DeleteFile(AppendFileName(UpdaterCfg().localsrc,"GCC.bm")); ++ FindFile ff(AppendFileName(UpdaterCfg().globalsrc, "*.bm")); ++ while (ff) { ++ if (ff.IsFile()) ++ FileDelete(AppendFileName(UpdaterCfg().localsrc, ff.GetName())); ++ ff.Next(); ++ } + break; + } + case 1:{