pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
devel/gprbuild: modify gprbuild-24.0
Module Name: pkgsrc-wip
Committed By: Dmytro Kazankov <dmytro.kazankov%gmail.com@localhost>
Pushed By: dkazankov
Date: Mon Mar 4 22:46:27 2024 +0200
Changeset: 096f13655196210d0f240da633620e53ac130ce0
Modified Files:
gprbuild/Makefile
gprbuild/files/buildlink.cgpr
Log Message:
devel/gprbuild: modify gprbuild-24.0
Build process is made insensitive to the pkgsrc's installation path
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=096f13655196210d0f240da633620e53ac130ce0
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
gprbuild/Makefile | 16 ++++++++++++----
gprbuild/files/buildlink.cgpr | 16 ++++++++--------
2 files changed, 20 insertions(+), 12 deletions(-)
diffs:
diff --git a/gprbuild/Makefile b/gprbuild/Makefile
index 1f11de9763..5d70ea6efb 100644
--- a/gprbuild/Makefile
+++ b/gprbuild/Makefile
@@ -32,6 +32,7 @@ GCC_REQD+= 13
OBJDIR= ${WRKDIR}/build
BOOTSTRAPDIR= ${WRKDIR}/bootstrap
+CGPRDIR= ${WRKDIR}/.home
PRECONFIGURE_ENV= ${CONFIGURE_ENV}
POSTCONFIGURE_ENV= ${CONFIGURE_ENV}
@@ -49,11 +50,17 @@ CONFIGURE_ARGS+= SOURCE_DIR=${WRKSRC}
BUILD_DIRS= ${OBJDIR}
MAKE_FILE= ${WRKSRC}/Makefile
-BUILD_MAKE_FLAGS= GPRBUILD_OPTIONS='--config=${PKGDIR}/files/buildlink.cgpr -aP ${WRKDIR}/.buildlink/share/gpr'
+BUILD_MAKE_FLAGS= GPRBUILD_OPTIONS='--config=${CGPRDIR}/buildlink.cgpr -aP ${WRKDIR}/.buildlink/share/gpr'
INSTALL_DIRS= ${OBJDIR}
-INSTALL_MAKE_FLAGS= GPRBUILD_OPTIONS='--config=${PKGDIR}/files/buildlink.cgpr -aP ${WRKDIR}/.buildlink/share/gpr'
-INSTALL_MAKE_FLAGS+= GPRINSTALL_OPTIONS='--config=${PKGDIR}/files/buildlink.cgpr -aP ${WRKDIR}/.buildlink/share/gpr'
+INSTALL_MAKE_FLAGS= GPRBUILD_OPTIONS='--config=${CGPRDIR}/buildlink.cgpr -aP ${WRKDIR}/.buildlink/share/gpr'
+INSTALL_MAKE_FLAGS+= GPRINSTALL_OPTIONS='--config=${CGPRDIR}/buildlink.cgpr -aP ${WRKDIR}/.buildlink/share/gpr'
+
+SUBST_CLASSES+= buildlink
+SUBST_STAGE.buildlink= pre-configure
+SUBST_FILES.buildlink= ../.home/buildlink.cgpr
+SUBST_MESSAGE.buildlink=Set work directory path in config project
+SUBST_SED.buildlink= -e 's,@WRKDIR@,${WRKDIR},g'
GENERATE_PLIST+= \
cd ${DESTDIR}${PREFIX} && \
@@ -66,6 +73,7 @@ post-patch:
${RUN} cd ${PKGDIR} \
&& ${PATCH} -d ${WRKSRC} -E -p0 -F0 <files/patch-gpr_src_put_resource_usage__unix.adb
.endif
+ ${RUN} ${CP} ${PKGDIR}/files/buildlink.cgpr ${CGPRDIR}/
pre-configure:
${RUN} ${MKDIR} ${BOOTSTRAPDIR}
@@ -84,6 +92,6 @@ post-configure:
./configure \
--prefix=${WRKDIR}/.buildlink \
&& set -x ; env ${MAKE_ENV} \
- ${MAKE_PROGRAM} all install GPROPTS='--config=${PKGDIR}/files/buildlink.cgpr'
+ ${MAKE_PROGRAM} all install GPROPTS='--config=${CGPRDIR}/buildlink.cgpr'
.include "../../mk/bsd.pkg.mk"
diff --git a/gprbuild/files/buildlink.cgpr b/gprbuild/files/buildlink.cgpr
index 54a2344ef9..6f75ccdbfe 100644
--- a/gprbuild/files/buildlink.cgpr
+++ b/gprbuild/files/buildlink.cgpr
@@ -12,7 +12,7 @@ configuration project default is
for Symbolic_Link_Supported use "true";
for Library_Major_Minor_Id_Supported use "true";
- for Library_Builder use "/usr/pkgsrc/wip/gprbuild/work/.buildlink/libexec/gprbuild/gprlib";
+ for Library_Builder use "@WRKDIR@/.buildlink/libexec/gprbuild/gprlib";
for Library_Support use "full";
for Shared_Library_Prefix use "lib";
for Shared_Library_Minimum_Switches use ("-shared");
@@ -26,16 +26,16 @@ configuration project default is
for Library_Encapsulated_Options use ("-shared", "-static-libgcc");
for Toolchain_Version ("Ada") use "GNAT 13.2.0";
- for Runtime_Dir ("Ada") use "/usr/pkgsrc/wip/gprbuild/work/.buildlink/gcc13-gnat/lib/gcc/x86_64--netbsd/13.2.0";
+ for Runtime_Dir ("Ada") use "@WRKDIR@/.buildlink/gcc13-gnat/lib/gcc/x86_64--netbsd/13.2.0";
package Builder is
for Executable_Suffix use "";
end Builder;
package Compiler is
- for Driver ("Ada") use "/usr/pkgsrc/wip/gprbuild/work/.gcc/bin/gcc";
- for Driver ("C") use "/usr/pkgsrc/wip/gprbuild/work/.gcc/bin/gcc";
- for Driver ("C++") use "/usr/pkgsrc/wip/gprbuild/work/.gcc/bin/g++";
+ for Driver ("Ada") use "@WRKDIR@/.gcc/bin/gcc";
+ for Driver ("C") use "@WRKDIR@/.gcc/bin/gcc";
+ for Driver ("C++") use "@WRKDIR@/.gcc/bin/g++";
for Language_Kind ("Ada") use "unit_based";
for Dependency_Kind ("Ada") use "ALI_File";
for Leading_Required_Switches ("Ada") use
@@ -70,7 +70,7 @@ configuration project default is
" Dot_Replacement => ""%d"");";
for Config_File_Unique ("Ada") use "False";
for Leading_Required_Switches ("Ada") use
- Compiler'Leading_Required_Switches ("Ada") & ("--RTS=/usr/pkgsrc/wip/gprbuild/work/.buildlink/gcc13-gnat/lib/gcc/x86_64--netbsd/13.2.0");
+ Compiler'Leading_Required_Switches ("Ada") & ("--RTS=@WRKDIR@/.buildlink/gcc13-gnat/lib/gcc/x86_64--netbsd/13.2.0");
for Leading_Required_Switches ("C") use
("-c", "-x", "c") & Compiler'Leading_Required_Switches ("C");
@@ -113,9 +113,9 @@ configuration project default is
package Binder is
for Objects_Path_File ("Ada") use "ADA_PRJ_OBJECTS_FILE";
for Driver ("Ada") use
- "/usr/pkgsrc/wip/gprbuild/work/.buildlink/libexec/gprbuild/gprbind";
+ "@WRKDIR@/.buildlink/libexec/gprbuild/gprbind";
for Required_Switches ("Ada") use
- Binder'Required_Switches ("Ada") & ("--RTS=/usr/pkgsrc/wip/gprbuild/work/.buildlink/gcc13-gnat/lib/gcc/x86_64--netbsd/13.2.0");
+ Binder'Required_Switches ("Ada") & ("--RTS=@WRKDIR@/.buildlink/gcc13-gnat/lib/gcc/x86_64--netbsd/13.2.0");
end Binder;
package Linker is
Home |
Main Index |
Thread Index |
Old Index