pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/flang



Module Name:    pkgsrc
Committed By:   nros
Date:           Sat Dec 23 13:13:36 UTC 2023

Modified Files:
        pkgsrc/lang/flang: Makefile PLIST distinfo
Added Files:
        pkgsrc/lang/flang/patches: patch-CMakeLists.txt
            patch-lib_Frontend_CMakeLists.txt

Log Message:
flang: fix build on non-darwin platfroms
Add patch to make sure CGPasses.h.inc
is generated.
Add LDLIBRARY_PATH on non-darwin
platforms so that flang-new can compile
the module files.
Make sure CMake generated directories
are not installed.
Soname is set on non-darwin platforms
so adapt the PLIST for this.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/flang/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/flang/PLIST pkgsrc/lang/flang/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/flang/patches/patch-CMakeLists.txt \
    pkgsrc/lang/flang/patches/patch-lib_Frontend_CMakeLists.txt

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/flang/Makefile
diff -u pkgsrc/lang/flang/Makefile:1.2 pkgsrc/lang/flang/Makefile:1.3
--- pkgsrc/lang/flang/Makefile:1.2      Wed Nov  8 13:19:49 2023
+++ pkgsrc/lang/flang/Makefile  Sat Dec 23 13:13:36 2023
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.2 2023/11/08 13:19:49 wiz Exp $
+# $NetBSD: Makefile,v 1.3 2023/12/23 13:13:36 nros Exp $
 
-PKGREVISION= 1
+PKGREVISION= 2
 .include "../../lang/llvm/version.mk"
 
 DISTNAME=      flang-${LLVM_VERSION}.src
@@ -24,9 +24,13 @@ CMAKE_ARGS+= -DBUILD_SHARED_LIBS=YES
 
 REPLACE_BASH=  tools/f18/flang-to-external-fc.in
 
+PLIST_VARS=    notdarwin
 .include "../../mk/bsd.prefs.mk"
 .if ${OPSYS} == "Darwin"
-MAKE_ENV+=     DYLD_LIBRARY_PATH=${WRKSRC}/${CMAKE_BUILD_DIR}/lib
+MAKE_ENV+=             DYLD_LIBRARY_PATH=${WRKSRC}/${CMAKE_BUILD_DIR}/lib
+.else
+PLIST.notdarwin=       yes
+MAKE_ENV+=             LD_LIBRARY_PATH=${WRKSRC}/${CMAKE_BUILD_DIR}/lib
 .endif
 
 .include "../../devel/cmake/build.mk"

Index: pkgsrc/lang/flang/PLIST
diff -u pkgsrc/lang/flang/PLIST:1.1 pkgsrc/lang/flang/PLIST:1.2
--- pkgsrc/lang/flang/PLIST:1.1 Fri Oct  6 19:15:21 2023
+++ pkgsrc/lang/flang/PLIST     Sat Dec 23 13:13:36 2023
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2023/10/06 19:15:21 adam Exp $
+@comment $NetBSD: PLIST,v 1.2 2023/12/23 13:13:36 nros Exp $
 bin/bbc
 bin/f18-parse-demo
 bin/fir-opt
@@ -269,20 +269,37 @@ lib/cmake/flang/FlangConfigVersion.cmake
 lib/cmake/flang/FlangTargets-release.cmake
 lib/cmake/flang/FlangTargets.cmake
 lib/libFIRAnalysis.so
+${PLIST.notdarwin}lib/libFIRAnalysis.so.16
 lib/libFIRBuilder.so
+${PLIST.notdarwin}lib/libFIRBuilder.so.16
 lib/libFIRCodeGen.so
+${PLIST.notdarwin}lib/libFIRCodeGen.so.16
 lib/libFIRDialect.so
+${PLIST.notdarwin}lib/libFIRDialect.so.16
 lib/libFIRSupport.so
+${PLIST.notdarwin}lib/libFIRSupport.so.16
 lib/libFIRTransforms.so
+${PLIST.notdarwin}lib/libFIRTransforms.so.16
 lib/libFortranCommon.so
+${PLIST.notdarwin}lib/libFortranCommon.so.16
 lib/libFortranDecimal.so
+${PLIST.notdarwin}lib/libFortranDecimal.so.16
 lib/libFortranEvaluate.so
+${PLIST.notdarwin}lib/libFortranEvaluate.so.16
 lib/libFortranLower.so
+${PLIST.notdarwin}lib/libFortranLower.so.16
 lib/libFortranParser.so
+${PLIST.notdarwin}lib/libFortranParser.so.16
 lib/libFortranRuntime.so
+${PLIST.notdarwin}lib/libFortranRuntime.so.16
 lib/libFortranSemantics.so
+${PLIST.notdarwin}lib/libFortranSemantics.so.16
 lib/libFortran_main.a
 lib/libHLFIRDialect.so
+${PLIST.notdarwin}lib/libHLFIRDialect.so.16
 lib/libHLFIRTransforms.so
+${PLIST.notdarwin}lib/libHLFIRTransforms.so.16
 lib/libflangFrontend.so
+${PLIST.notdarwin}lib/libflangFrontend.so.16
 lib/libflangFrontendTool.so
+${PLIST.notdarwin}lib/libflangFrontendTool.so.16
Index: pkgsrc/lang/flang/distinfo
diff -u pkgsrc/lang/flang/distinfo:1.1 pkgsrc/lang/flang/distinfo:1.2
--- pkgsrc/lang/flang/distinfo:1.1      Fri Oct  6 19:15:21 2023
+++ pkgsrc/lang/flang/distinfo  Sat Dec 23 13:13:36 2023
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2023/10/06 19:15:21 adam Exp $
+$NetBSD: distinfo,v 1.2 2023/12/23 13:13:36 nros Exp $
 
 BLAKE2s (cmake-16.0.6.src.tar.xz) = a967225f31bcd98484d632a2d530c498131b0035f18b15e27915663b915dc6ba
 SHA512 (cmake-16.0.6.src.tar.xz) = 52ecd941d2d85a5b668caa5d0d40480cb6a97b3bf1174e634c2a93e9ef6d03670ca7e96abb0a60cb33ba537b93d5788754dab1f2f45c1f623f788162717d088b
@@ -6,3 +6,5 @@ Size (cmake-16.0.6.src.tar.xz) = 9008 by
 BLAKE2s (flang-16.0.6.src.tar.xz) = e6c603ee4fa9243e99ec39c5924b8ea5cca868e1830d7b58e4ee7399cd368c39
 SHA512 (flang-16.0.6.src.tar.xz) = 42c1d978946fae320cd4d91e766f1bc5b83ffe0ba676e245b287f5460ffaee25e77f5a1c118e94c0329922dfb9c10f06fb7d76c63481108ba0bd3ae4a0d7937e
 Size (flang-16.0.6.src.tar.xz) = 2369292 bytes
+SHA1 (patch-CMakeLists.txt) = 191c963ddceff09a4950e0dc287dfd8269bb2ea1
+SHA1 (patch-lib_Frontend_CMakeLists.txt) = f245d3fceb9eca530806b0b3206e11a461c7a8e0

Added files:

Index: pkgsrc/lang/flang/patches/patch-CMakeLists.txt
diff -u /dev/null pkgsrc/lang/flang/patches/patch-CMakeLists.txt:1.1
--- /dev/null   Sat Dec 23 13:13:36 2023
+++ pkgsrc/lang/flang/patches/patch-CMakeLists.txt      Sat Dec 23 13:13:36 2023
@@ -0,0 +1,25 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2023/12/23 13:13:36 nros Exp $
+
+Don't create empty directories in ${PREFIX}/include
+
+--- CMakeLists.txt.orig        2023-06-10 22:58:16.000000000 +0000
++++ CMakeLists.txt
+@@ -481,12 +481,17 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+     PATTERN "*.td"
+     PATTERN "config.h" EXCLUDE
+     PATTERN ".git"     EXCLUDE
+-    PATTERN "CMakeFiles" EXCLUDE)
++    PATTERN "CMakeFiles" EXCLUDE
++    PATTERN "OpenMP" EXCLUDE
++    PATTERN "Config" EXCLUDE)
+ 
+   install(DIRECTORY ${FLANG_INCLUDE_DIR}/flang
+     DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
+     COMPONENT flang-headers
+     FILES_MATCHING
+     PATTERN "*.inc"
++    PATTERN "CMakeFiles" EXCLUDE
++    PATTERN "OpenMP" EXCLUDE
++    PATTERN "Config" EXCLUDE
+     )
+ endif()
Index: pkgsrc/lang/flang/patches/patch-lib_Frontend_CMakeLists.txt
diff -u /dev/null pkgsrc/lang/flang/patches/patch-lib_Frontend_CMakeLists.txt:1.1
--- /dev/null   Sat Dec 23 13:13:36 2023
+++ pkgsrc/lang/flang/patches/patch-lib_Frontend_CMakeLists.txt Sat Dec 23 13:13:36 2023
@@ -0,0 +1,16 @@
+$NetBSD: patch-lib_Frontend_CMakeLists.txt,v 1.1 2023/12/23 13:13:36 nros Exp $
+
+Fix: flang/Optimizer/CodeGen/CGPasses.h.inc: No such file or directory
+Solution taken from Github:
+https://github.com/llvm/llvm-project/pull/71691
+
+--- lib/Frontend/CMakeLists.txt.orig   2023-12-23 11:42:38.817766101 +0000
++++ lib/Frontend/CMakeLists.txt
+@@ -16,6 +16,7 @@ add_flang_library(flangFrontend
+   FIRBuilder
+   FIRDialect
+   FIRSupport
++  FIROptCodeGenPassIncGen
+   FIROptTransformsPassIncGen
+   HLFIRDialect
+   MLIRIR



Home | Main Index | Thread Index | Old Index