1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

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 <lightside@gmx.com>
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]
This commit is contained in:
Jan Beich 2015-05-04 11:17:21 +00:00
parent 4858b57f38
commit 2ff55b4bb2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=385394
8 changed files with 96 additions and 25 deletions

View File

@ -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 <bsd.port.mk>

View File

@ -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

View File

@ -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\"";

View File

@ -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;

View File

@ -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";

View File

@ -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

View File

@ -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,

View File

@ -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:{