diff options
author | Thierry Thomas <thierry@FreeBSD.org> | 2022-12-14 12:31:37 +0000 |
---|---|---|
committer | Thierry Thomas <thierry@FreeBSD.org> | 2022-12-18 21:13:54 +0000 |
commit | e144ceaf68011728c68e6aaac9782d860747361e (patch) | |
tree | 63fa15b379f2970f3a3a480a4033d94a6e17ddf6 | |
parent | cbdf6be4c4d96bfbb15497083f46581c5e0f7ee8 (diff) | |
download | ports-e144ceaf68011728c68e6aaac9782d860747361e.tar.gz ports-e144ceaf68011728c68e6aaac9782d860747361e.zip |
devel/gprbuild: resurrect
-rw-r--r-- | MOVED | 1 | ||||
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/gprbuild/Makefile | 40 | ||||
-rw-r--r-- | devel/gprbuild/distinfo | 3 | ||||
-rw-r--r-- | devel/gprbuild/files/Makefile.BSD | 80 | ||||
-rw-r--r-- | devel/gprbuild/files/patch-share_gprconfig_compilers.xml | 24 | ||||
-rw-r--r-- | devel/gprbuild/files/patch-share_gprconfig_gnat.xml | 20 | ||||
-rw-r--r-- | devel/gprbuild/files/patch-share_gprconfig_linker.xml | 56 | ||||
-rw-r--r-- | devel/gprbuild/files/patch-share_gprconfig_targetset.xml | 54 | ||||
-rw-r--r-- | devel/gprbuild/files/patch-src_gprlib.adb | 50 | ||||
-rw-r--r-- | devel/gprbuild/pkg-descr | 10 | ||||
-rw-r--r-- | devel/gprbuild/pkg-plist | 23 |
12 files changed, 361 insertions, 1 deletions
@@ -16894,7 +16894,6 @@ devel/ahven||2022-02-28|Removed, depends on expired lang/gcc6-aux devel/alog||2022-02-28|Removed, depends on expired lang/gcc6-aux devel/aunit||2022-02-28|Removed, depends on expired lang/gcc6-aux devel/florist-gpl||2022-02-28|Removed, depends on expired lang/gcc6-aux -devel/gprbuild||2022-02-28|Removed, depends on expired lang/gcc6-aux devel/libspark2012||2022-02-28|Removed, depends on expired lang/gcc6-aux devel/matreshka||2022-02-28|Removed, depends on expired lang/gcc6-aux devel/pcsc-ada||2022-02-28|Removed, depends on expired lang/gcc6-aux diff --git a/devel/Makefile b/devel/Makefile index 172edef4a323..e51b1254093e 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -877,6 +877,7 @@ SUBDIR += gpds SUBDIR += gperf SUBDIR += gpm + SUBDIR += gprbuild SUBDIR += gputils SUBDIR += gradle SUBDIR += gradle-completion diff --git a/devel/gprbuild/Makefile b/devel/gprbuild/Makefile new file mode 100644 index 000000000000..0d1b625336e4 --- /dev/null +++ b/devel/gprbuild/Makefile @@ -0,0 +1,40 @@ +# Created by: John Marino <marino@FreeBSD.org> + +PORTNAME= gprbuild +PORTVERSION= ${SNAPSHOT} +PORTREVISION= 1 +CATEGORIES= devel + +MAINTAINER= ports@FreeBSD.org +COMMENT= Adacore multi-language software build tool + +LICENSE= GPLv3+ +LICENSE_FILE= ${WRKSRC}/COPYING3 + +BUILD_DEPENDS= xmlada>=4.4:textproc/xmlada + +SNAPSHOT= 20160609 +USES= ada +USE_GITHUB= yes +GH_ACCOUNT= AdaCore +GH_TAGNAME= 376670f + +PORTDOCS= * +MAKE_ARGS= PROCESSORS=${MAKE_JOBS_NUMBER} +BUILD_WRKSRC= ${WRKSRC}/construction +INSTALL_WRKSRC= ${BUILD_WRKSRC} +INSTALL_TARGET= install + +OPTIONS_DEFINE= DOCS +#DOCS_BUILD_DEPENDS= sphinx-build:textproc/py-sphinx +#DOCS_ALL_TARGET= gen-docs +#DOCS_INSTALL_TARGET= install-docs + +post-patch: + @${MKDIR} ${BUILD_WRKSRC} + @${CP} ${FILESDIR}/Makefile.BSD ${BUILD_WRKSRC}/Makefile + @${REINPLACE_CMD} -i "" -e "s,@AUXPREFIX@,${PREFIX}/${ADAXX}-aux," \ + ${WRKSRC}/share/gprconfig/compilers.xml + @${RM} ${WRKSRC}/share/gprconfig/*.orig + +.include <bsd.port.mk> diff --git a/devel/gprbuild/distinfo b/devel/gprbuild/distinfo new file mode 100644 index 000000000000..0557ba24010b --- /dev/null +++ b/devel/gprbuild/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1465501253 +SHA256 (AdaCore-gprbuild-20160609-376670f_GH0.tar.gz) = c595767f69cca960d5f0f7bfa5f7bdcfb2fcba11822432e87f1eef52cfb68fab +SIZE (AdaCore-gprbuild-20160609-376670f_GH0.tar.gz) = 958175 diff --git a/devel/gprbuild/files/Makefile.BSD b/devel/gprbuild/files/Makefile.BSD new file mode 100644 index 000000000000..cc359e7f8caf --- /dev/null +++ b/devel/gprbuild/files/Makefile.BSD @@ -0,0 +1,80 @@ +.PATH: ../src +.PATH: ../gpr/src + +STATIC_FLAGS= -gnat12 -gnaty -gnatQ -O2 -gnatpn -gnatws -g1 + +PREFIX?= /usr/local +GPRLIB_INC= -I${PREFIX}/include/xmlada -I../gpr/src +LOOK= -aL${PREFIX}/lib/xmlada/static -aI${PREFIX}/include/xmlada + +libgpr_csrc= gprbuild_dummies.c \ + gpr_imports.c + +LARGS= ${libgpr_csrc:S/^/-largs /:.c=.o} \ + -largs ${PREFIX}/lib/xmlada/static/libxmlada_dom.a \ + -largs ${PREFIX}/lib/xmlada/static/libxmlada_input_sources.a \ + -largs ${PREFIX}/lib/xmlada/static/libxmlada_sax.a \ + -largs ${PREFIX}/lib/xmlada/static/libxmlada_schema.a \ + -largs ${PREFIX}/lib/xmlada/static/libxmlada_unicode.a + +APPS= gprclean/gprclean-main.adb \ + gprconfig/gprconfig-main.adb \ + gprbuild/gprbuild-main.adb \ + gprbind/gprbind.adb \ + gprlib/gprlib.adb \ + gprinstall/gprinstall-main.adb \ + gprslave/gprslave.adb \ + gprname/gprname-main.adb \ + gprls/gprls-main.adb + +all: ${APPS:H} + +gprclean: gprclean-main.adb ${libgpr_csrc:.c=.o} + gnatmake -o ${.TARGET} -j${PROCESSORS} \ + ${STATIC_FLAGS} ${GPRLIB_INC} ${LOOK} \ + ${.ALLSRC:M*adb} ${LARGS} + +.for app in ${APPS:Ngprclean*} +${app:H}: gprclean ${app:T} ${libgpr_csrc:.c=.o} + gnatmake -o ${.TARGET} ${STATIC_FLAGS} ${GPRLIB_INC} ${LOOK} \ + ${.ALLSRC:M*adb} ${LARGS} +.endfor + +clean: + rm -f *.o *.ali b~* ${APP:H} + +gen-docs: + ${MAKE} -e -C ${.CURDIR:H}/doc html txt + +install: + mkdir -p ${DESTDIR}${PREFIX}/bin \ + ${DESTDIR}${PREFIX}/libexec/gprbuild \ + ${DESTDIR}${PREFIX}/share/gpr \ + ${DESTDIR}${PREFIX}/share/gprconfig + ${BSD_INSTALL_PROGRAM} \ + ${.CURDIR}/gprclean \ + ${.CURDIR}/gprinstall \ + ${.CURDIR}/gprconfig \ + ${.CURDIR}/gprslave \ + ${.CURDIR}/gprls \ + ${.CURDIR}/gprname \ + ${.CURDIR}/gprbuild \ + ${DESTDIR}${PREFIX}/bin + ${BSD_INSTALL_PROGRAM} \ + ${.CURDIR}/gprbind \ + ${.CURDIR}/gprlib \ + ${DESTDIR}${PREFIX}/libexec/gprbuild + ${BSD_INSTALL_DATA} \ + ${.CURDIR}/../share/_default.gpr \ + ${DESTDIR}${PREFIX}/share/gpr + ${BSD_INSTALL_DATA} \ + ${.CURDIR}/../share/gprconfig/*.x[sm][dl] \ + ${DESTDIR}${PREFIX}/share/gprconfig + +install-docs: + mkdir -p ${DESTDIR}${PREFIX}/share/doc/gprbuild/txt + ${BSD_INSTALL_DATA} ${.CURDIR}/../doc/txt/gprbuild_ug.txt \ + ${DESTDIR}${PREFIX}/share/doc/gprbuild/txt + rm -rf ${.CURDIR}/../doc/html/_sources + rm -f ${.CURDIR}/../doc/html/.buildinfo + cp -a ${.CURDIR}/../doc/html ${DESTDIR}${PREFIX}/share/doc/gprbuild diff --git a/devel/gprbuild/files/patch-share_gprconfig_compilers.xml b/devel/gprbuild/files/patch-share_gprconfig_compilers.xml new file mode 100644 index 000000000000..e3b32868b634 --- /dev/null +++ b/devel/gprbuild/files/patch-share_gprconfig_compilers.xml @@ -0,0 +1,24 @@ +--- share/gprconfig/compilers.xml.orig 2015-04-28 15:02:41 UTC ++++ share/gprconfig/compilers.xml +@@ -693,17 +693,15 @@ + </version> + <languages>Ada</languages> + <variable name="gcc_version"> +- <external>${PREFIX}gcc -v</external> ++ <external>${PREFIX}ada -v</external> + <grep regexp="^[-\w]*gcc \S+ (\S+)" group="1"></grep> + </variable> + <runtimes default="default,kernel,native"> +- <directory group="default" >\.\./lib/gcc(-lib)?/$TARGET/$gcc_version/adalib/</directory> +- <directory group="default" contents="^rts-">\.\./lib/gcc(-lib)?/$TARGET/$gcc_version/ada_object_path</directory> +- <directory group="2" >\.\./lib/gcc(-lib)?/$TARGET/$gcc_version/rts-(.*)/adalib/</directory> +- <directory group="1" >\.\./$TARGET/lib/gnat/(.*)/adalib/</directory> ++ <directory group="default">\.\./lib/gcc/$TARGET/$gcc_version/adalib</directory> ++ <directory group="0">/usr/local/gcc5-aux/lib/gcc/$TARGET/$gcc_version/adalib</directory> + </runtimes> + <target> +- <external>${PREFIX}gcc -dumpmachine</external> ++ <external>${PREFIX}ada -dumpmachine</external> + <grep regexp="[^\r\n]+"></grep> + </target> + </compiler_description> diff --git a/devel/gprbuild/files/patch-share_gprconfig_gnat.xml b/devel/gprbuild/files/patch-share_gprconfig_gnat.xml new file mode 100644 index 000000000000..38e9d4021c0c --- /dev/null +++ b/devel/gprbuild/files/patch-share_gprconfig_gnat.xml @@ -0,0 +1,20 @@ +--- share/gprconfig/gnat.xml.orig 2014-10-13 22:03:37 UTC ++++ share/gprconfig/gnat.xml +@@ -63,7 +63,7 @@ + </config> + </configuration> + +- <!-- GNAT --> ++ <!-- GNAT (tailored to lang/gcc5-aux) --> + <configuration> + &filter_gnat; + <config> +@@ -75,7 +75,7 @@ + end Naming; + + package Compiler is +- for Driver ("Ada") use "${PATH(ada)}${PREFIX(ada)}gcc"; ++ for Driver ("Ada") use "${PATH(ada)}${PREFIX(ada)}ada"; + for Language_Kind ("Ada") use "unit_based"; + for Dependency_Kind ("Ada") use "ALI_File"; + for Leading_Required_Switches ("Ada") use diff --git a/devel/gprbuild/files/patch-share_gprconfig_linker.xml b/devel/gprbuild/files/patch-share_gprconfig_linker.xml new file mode 100644 index 000000000000..b3b7d8bc4357 --- /dev/null +++ b/devel/gprbuild/files/patch-share_gprconfig_linker.xml @@ -0,0 +1,56 @@ +--- share/gprconfig/linker.xml.orig 2015-04-28 14:21:56 UTC ++++ share/gprconfig/linker.xml +@@ -687,11 +687,14 @@ + </config> + </configuration> + +- <!-- linux, freebsd and Irix--> ++ <!-- linux, bsd and Irix--> + <configuration> + <targets> + <target name="^.*linux.*$" /> + <target name="^.*freebsd.*$" /> ++ <target name="^.*dragonfly.*$" /> ++ <target name="^.*openbsd.*$" /> ++ <target name="^.*netbsd.*$" /> + <target name="^.*irix.*$" /> + </targets> + <config> +@@ -763,10 +766,13 @@ + </config> + </configuration> + +- <!-- freebsd --> ++ <!-- bsd --> + <configuration> + <targets> + <target name="^.*freebsd.*$" /> ++ <target name="^.*dragonfly.*$" /> ++ <target name="^.*openbsd.*$" /> ++ <target name="^.*netbsd.*$" /> + </targets> + <config> + for Run_Path_Option use ("-Wl,-rpath,"); +@@ -1308,6 +1314,12 @@ + <target name="^.*mingw.*$" /> + <target name="^.*linux.*$" /> + <target name="^.*freebsd.*$" /> ++ <target name="^.*dragonfly.*$" /> ++ <target name="^.*openbsd.*$" /> ++ <target name="^.*netbsd.*$" /> ++ <target name="^.*dragonfly.*$" /> ++ <target name="^.*openbsd.*$" /> ++ <target name="^.*netbsd.*$" /> + </targets> + <compilers negate="true"> + <compiler language="C++" /> +@@ -1392,6 +1404,9 @@ + <target name="^.*mingw.*$" /> + <target name="^.*linux.*$" /> + <target name="^.*freebsd.*$" /> ++ <target name="^.*dragonfly.*$" /> ++ <target name="^.*openbsd.*$" /> ++ <target name="^.*netbsd.*$" /> + </targets> + <compilers> + <compiler language="C++" /> diff --git a/devel/gprbuild/files/patch-share_gprconfig_targetset.xml b/devel/gprbuild/files/patch-share_gprconfig_targetset.xml new file mode 100644 index 000000000000..7ff72692b9fd --- /dev/null +++ b/devel/gprbuild/files/patch-share_gprconfig_targetset.xml @@ -0,0 +1,54 @@ +--- share/gprconfig/targetset.xml.orig 2014-09-11 13:36:47 UTC ++++ share/gprconfig/targetset.xml +@@ -66,8 +66,8 @@ + + <!-- x86-solaris --> + <targetset> +- <target>x86-solaris</target> +- <target>i.86-(pc-)?solaris.*</target> ++ <target>i.86-.*-solaris.*</target> ++ <target>x86_64-.*-solaris.*</target> + </targetset> + + <!-- x86-windows (mingw) --> +@@ -162,19 +162,34 @@ + <target>pent.*-cygwin.*</target> + </targetset> + +- <!-- x86 Freebsd --> ++ <!-- Freebsd --> + <targetset> +- <target>x86-freebsd</target> + <target>i.86-.*freebsd.*</target> ++ <target>amd64-.*-freebsd.*</target> ++ <target>x86_64-.*-freebsd.*</target> + </targetset> + +- <!-- x86_64 Freebsd --> ++ <!-- DragonFlyBSD --> + <targetset> +- <target>x86_64-freebsd</target> +- <target>x86_64-.*freebsd.*</target> +- <target>amd64-.*freebsd.*</target> ++ <target>i.86-.*-dragonfly.*</target> ++ <target>x86_64-.*-dragonfly.*</target> + </targetset> + ++ <!-- NetBSD --> ++ <targetset> ++ <target>i.86-.*-netbsd.*</target> ++ <target>amd64-.*-netbsd.*</target> ++ <target>x86_64-.*-netbsd.*</target> ++ </targetset> ++ ++ <!-- OpenBSD --> ++ <targetset> ++ <target>i.86-.*-openbsd.*</target> ++ <target>amd64-.*-openbsd.*</target> ++ <target>x86_64-.*-openbsd.*</target> ++ </targetset> ++ ++ + <!-- Cross Ports --> + <!-- *********** --> + diff --git a/devel/gprbuild/files/patch-src_gprlib.adb b/devel/gprbuild/files/patch-src_gprlib.adb new file mode 100644 index 000000000000..4385d5c92e45 --- /dev/null +++ b/devel/gprbuild/files/patch-src_gprlib.adb @@ -0,0 +1,50 @@ +--- src/gprlib.adb.orig 2015-05-06 11:08:38 UTC ++++ src/gprlib.adb +@@ -393,6 +393,11 @@ procedure Gprlib is + + Separate_Run_Path_Options : Boolean := False; + ++ Rpath_Disabled : Boolean := False; ++ -- If -R is passed through the library options for the linker, it will ++ -- prevent the implemented libraries portion of the rpath switch from ++ -- being built, even if the linker is capable of supporting rpath. ++ + Rpath : String_List_Access := null; + -- Allocated only if Path Option is supported + +@@ -1011,7 +1016,12 @@ begin + Use_GNAT_Lib := False; + end if; + +- Library_Options_Table.Append (new String'(Line (1 .. Last))); ++ if Line (1 .. Last) = "-R" then ++ Rpath_Disabled := True; ++ else ++ Library_Options_Table.Append ++ (new String'(Line (1 .. Last))); ++ end if; + + when Gprexch.Library_Rpath_Options => + Library_Rpath_Options_Table.Append +@@ -1143,10 +1153,10 @@ begin + + Libgnat := + new String' +- ("-lgnat-" & Line (6 .. Last)); ++ ("-lgnat-" & Line (6)); + Libgnarl := + new String' +- ("-lgnarl-" & Line (6 .. Last)); ++ ("-lgnarl-" & Line (6)); + end if; + + else +@@ -2113,7 +2123,7 @@ begin + Library_Switches_Table.Append + (new String'("-L" & Imported_Library_Directories.Table (J).all)); + +- if Path_Option /= null then ++ if not Rpath_Disabled and then Path_Option /= null then + Add_Rpath (Imported_Library_Directories.Table (J)); + end if; + diff --git a/devel/gprbuild/pkg-descr b/devel/gprbuild/pkg-descr new file mode 100644 index 000000000000..04cda280a036 --- /dev/null +++ b/devel/gprbuild/pkg-descr @@ -0,0 +1,10 @@ +GPRbuild is an advanced software tool designed to help automate the +construction of multi-language systems. It removes the complexity from +multi-language development by allowing developers to quickly and easily +compile and link software written in a combination of languages including +Ada, Assembler, C, C++, and Fortran. Easily extendable by users to cover +new toolchains and languages it is primarily aimed at projects of all sizes +organized into subsystems and libraries and is particularly well suited for +compiled languages. + +WWW: https://www.adacore.com/home/products/gnatpro/toolsuite/gprbuild/ diff --git a/devel/gprbuild/pkg-plist b/devel/gprbuild/pkg-plist new file mode 100644 index 000000000000..1ec5d5e08a34 --- /dev/null +++ b/devel/gprbuild/pkg-plist @@ -0,0 +1,23 @@ +bin/gprbuild +bin/gprclean +bin/gprconfig +bin/gprinstall +bin/gprls +bin/gprname +bin/gprslave +libexec/gprbuild/gprbind +libexec/gprbuild/gprlib +share/gpr/_default.gpr +share/gprconfig/asm.xml +share/gprconfig/c.xml +share/gprconfig/clean.xml +share/gprconfig/compilers.xml +share/gprconfig/cpp.xml +share/gprconfig/cross.xml +share/gprconfig/fortran.xml +share/gprconfig/gnat.xml +share/gprconfig/gprconfig.xsd +share/gprconfig/linker.xml +share/gprconfig/nocompiler.xml +share/gprconfig/targetset.xml +share/gprconfig/windres.xml |