Page MenuHomeFreeBSD

D8439.id22434.diff
No OneTemporary

D8439.id22434.diff

Index: devel/llbuild/Makefile
===================================================================
--- /dev/null
+++ devel/llbuild/Makefile
@@ -0,0 +1,33 @@
+# $FreeBSD$
+
+PORTNAME= llbuild
+DISTVERSION= swift-DEVELOPMENT-SNAPSHOT-2016-11-01-a
+CATEGORIES= devel
+
+MAINTAINER= jonathan@FreeBSD.org
+COMMENT= Low-level build system, used by the Swift Package Manager
+
+LICENSE= APACHE20 BSD3CLAUSE LLVM
+LICENSE_COMB= multi
+LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+
+BUILD_DEPENDS= llvm-lit39:devel/llvm39
+LIB_DEPENDS= libsqlite3.so:databases/sqlite3
+
+USE_GITHUB= yes
+GH_ACCOUNT= apple
+GH_PROJECT= swift-llbuild
+
+USES= cmake:outsource
+
+USE_LDCONFIG= yes
+
+OPTIONS_DEFINE= DOCS
+
+PORTDOCS= CONTRIBUTING.md README.md
+
+post-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
Index: devel/llbuild/distinfo
===================================================================
--- /dev/null
+++ devel/llbuild/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1478217141
+SHA256 (apple-swift-llbuild-swift-DEVELOPMENT-SNAPSHOT-2016-11-01-a_GH0.tar.gz) = 567ae284e388ba399bbe3a0fa129edd06d803b6ab90c3a1ace4549d686f4a9b2
+SIZE (apple-swift-llbuild-swift-DEVELOPMENT-SNAPSHOT-2016-11-01-a_GH0.tar.gz) = 4718056
Index: devel/llbuild/files/patch-CMakeLists.txt
===================================================================
--- /dev/null
+++ devel/llbuild/files/patch-CMakeLists.txt
@@ -0,0 +1,27 @@
+--- CMakeLists.txt.orig 2016-10-20 04:49:37 UTC
++++ CMakeLists.txt
+@@ -112,6 +112,13 @@ endif()
+ include_directories(BEFORE
+ ${CMAKE_SOURCE_DIR}/include)
+
++# On FreeBSD, /usr/local/* is not used by default. In order to build LLVM
++# with sqlite3, etc., we must add /usr/local paths.
++if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
++ include_directories("/usr/local/include")
++ link_directories("/usr/local/lib")
++endif(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
++
+ # Xcode: Use libc++ and c++14 using proper build settings.
+ if (XCODE)
+ # Force usage of Clang.
+@@ -170,8 +177,8 @@ else ()
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor")
+ endif ()
+
+-# On Linux, always build with PIC.
+-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
++# On BSD and Linux, always build with PIC.
++if(${CMAKE_SYSTEM_NAME} MATCHES ".*BSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
+ endif ()
Index: devel/llbuild/files/patch-cmake_modules_FindFileCheck.cmake
===================================================================
--- /dev/null
+++ devel/llbuild/files/patch-cmake_modules_FindFileCheck.cmake
@@ -0,0 +1,17 @@
+--- cmake/modules/FindFileCheck.cmake.orig 2016-11-04 00:07:45 UTC
++++ cmake/modules/FindFileCheck.cmake
+@@ -5,12 +5,12 @@
+ # FILECHECK_EXECUTABLE
+
+ find_program(FILECHECK_EXECUTABLE
+- NAMES FileCheck
++ NAMES FileCheck FileCheck39
+ DOC "Path to 'FileCheck' executable")
+
+ # Handle REQUIRED and QUIET arguments, this will also set FILECHECK_FOUND to true
+ # if FILECHECK_EXECUTABLE exists.
+ include(FindPackageHandleStandardArgs)
+-find_package_handle_standard_args(FileCheck
++find_package_handle_standard_args(FileCheck39
+ "Failed to locate 'FileCheck' executable"
+ FILECHECK_EXECUTABLE)
Index: devel/llbuild/files/patch-cmake_modules_FindLit.cmake
===================================================================
--- /dev/null
+++ devel/llbuild/files/patch-cmake_modules_FindLit.cmake
@@ -0,0 +1,11 @@
+--- cmake/modules/FindLit.cmake.orig 2016-10-20 04:49:37 UTC
++++ cmake/modules/FindLit.cmake
+@@ -5,7 +5,7 @@
+ # LIT_EXECUTABLE
+
+ find_program(LIT_EXECUTABLE
+- NAMES lit
++ NAMES lit llvm-lit llvm-lit39
+ DOC "Path to 'lit' executable")
+
+ # Handle REQUIRED and QUIET arguments, this will also set LIT_FOUND to true
Index: devel/llbuild/files/patch-lib_Basic_CMakeLists.txt
===================================================================
--- /dev/null
+++ devel/llbuild/files/patch-lib_Basic_CMakeLists.txt
@@ -0,0 +1,10 @@
+--- lib/Basic/CMakeLists.txt.orig 2016-10-20 04:49:37 UTC
++++ lib/Basic/CMakeLists.txt
+@@ -7,6 +7,6 @@ add_llbuild_library(llbuildBasic
+ ShellUtility.cpp
+ )
+
+-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
++if(${CMAKE_SYSTEM_NAME} MATCHES ".*BSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ target_link_libraries(llbuildBasic pthread)
+ endif()
Index: devel/llbuild/files/patch-lib_Ninja_CMakeLists.txt
===================================================================
--- /dev/null
+++ devel/llbuild/files/patch-lib_Ninja_CMakeLists.txt
@@ -0,0 +1,8 @@
+--- lib/Ninja/CMakeLists.txt.orig 2016-10-20 04:49:37 UTC
++++ lib/Ninja/CMakeLists.txt
+@@ -4,3 +4,5 @@ add_llbuild_library(llbuildNinja
+ ManifestLoader.cpp
+ Parser.cpp
+ )
++
++target_link_libraries(llbuildNinja llvmSupport curses)
Index: devel/llbuild/files/patch-lib_llvm_Support_CMakeLists.txt
===================================================================
--- /dev/null
+++ devel/llbuild/files/patch-lib_llvm_Support_CMakeLists.txt
@@ -0,0 +1,13 @@
+--- lib/llvm/Support/CMakeLists.txt.orig 2016-10-20 04:49:37 UTC
++++ lib/llvm/Support/CMakeLists.txt
+@@ -38,6 +38,10 @@ circular_raw_ostream.cpp
+ raw_ostream.cpp
+ )
+
++if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
++ target_link_libraries(llvmSupport execinfo pthread)
++endif()
++
+ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ target_link_libraries(llvmSupport pthread dl)
+ endif()
Index: devel/llbuild/files/patch-lib_llvm_Support_Unix_Process.inc
===================================================================
--- /dev/null
+++ devel/llbuild/files/patch-lib_llvm_Support_Unix_Process.inc
@@ -0,0 +1,15 @@
+--- lib/llvm/Support/Unix/Process.inc.orig 2016-10-20 04:49:37 UTC
++++ lib/llvm/Support/Unix/Process.inc
+@@ -33,10 +33,10 @@
+ #if HAVE_SIGNAL_H
+ #include <signal.h>
+ #endif
+-// DragonFlyBSD, OpenBSD, and Bitrig have deprecated <malloc.h> for
++// DragonFlyBSD, FreeBSD, OpenBSD, and Bitrig have deprecated <malloc.h> for
+ // <stdlib.h> instead. Unix.h includes this for us already.
+ #if defined(HAVE_MALLOC_H) && !defined(__DragonFly__) && \
+- !defined(__OpenBSD__) && !defined(__Bitrig__)
++ !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__Bitrig__)
+ #include <malloc.h>
+ #endif
+ #if defined(HAVE_MALLCTL)
Index: devel/llbuild/files/patch-products_llbuild_CMakeLists.txt
===================================================================
--- /dev/null
+++ devel/llbuild/files/patch-products_llbuild_CMakeLists.txt
@@ -0,0 +1,17 @@
+--- products/llbuild/CMakeLists.txt.orig 2016-10-20 04:49:37 UTC
++++ products/llbuild/CMakeLists.txt
+@@ -11,3 +11,14 @@ target_link_libraries(llbuild
+ sqlite3
+ curses
+ )
++
++install(TARGETS llbuild
++ COMPONENT llbuild
++ DESTINATION bin)
++
++add_custom_target(install-llbuild
++ DEPENDS llbuild
++ COMMENT "Installing llbuild..."
++ COMMAND "${CMAKE_COMMAND}"
++ -DCMAKE_INSTALL_COMPONENT=llbuild
++ -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
Index: devel/llbuild/pkg-descr
===================================================================
--- /dev/null
+++ devel/llbuild/pkg-descr
@@ -0,0 +1,9 @@
+llbuild is a set of libraries for building build systems. Unlike most build
+system projects which focus on the syntax for describing the build, llbuild
+is designed around a reusable, flexible, and scalable general purpose build
+engine capable of solving many "build system"-like problems. The project
+also includes additional libraries on top of that engine which provide
+support for constructing bespoke build systems (like swift build) or for
+building from Ninja manifests.
+
+WWW: https://github.com/apple/swift-llbuild
Index: devel/llbuild/pkg-plist
===================================================================
--- /dev/null
+++ devel/llbuild/pkg-plist
@@ -0,0 +1,7 @@
+bin/llbuild
+bin/swift-build-tool
+include/llbuild/buildsystem.h
+include/llbuild/core.h
+include/llbuild/llbuild.h
+include/llbuild/module.modulemap
+lib/libllbuild.so

File Metadata

Mime Type
text/plain
Expires
Mon, Oct 27, 1:15 AM (14 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24262397
Default Alt Text
D8439.id22434.diff (8 KB)

Event Timeline