Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Oct 2017 22:34:30 +0000 (UTC)
From:      Jonathan Anderson <jonathan@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r452958 - in head/devel: . llbuild llbuild/files
Message-ID:  <201710262234.v9QMYUSo001241@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jonathan (src committer)
Date: Thu Oct 26 22:34:30 2017
New Revision: 452958
URL: https://svnweb.freebsd.org/changeset/ports/452958

Log:
  New port: devel/llbuild
  
  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/switch-llbuild
  
  Approved by:	mat
  Sponsored by:	DARPA, AFRL
  Differential Revision:	https://reviews.freebsd.org/D8439

Added:
  head/devel/llbuild/
  head/devel/llbuild/Makefile   (contents, props changed)
  head/devel/llbuild/distinfo   (contents, props changed)
  head/devel/llbuild/files/
  head/devel/llbuild/files/patch-CMakeLists.txt   (contents, props changed)
  head/devel/llbuild/files/patch-cmake_modules_FindFileCheck.cmake   (contents, props changed)
  head/devel/llbuild/files/patch-cmake_modules_FindLit.cmake   (contents, props changed)
  head/devel/llbuild/files/patch-lib_Basic_CMakeLists.txt   (contents, props changed)
  head/devel/llbuild/files/patch-lib_Ninja_CMakeLists.txt   (contents, props changed)
  head/devel/llbuild/files/patch-lib_llvm_Support_CMakeLists.txt   (contents, props changed)
  head/devel/llbuild/files/patch-lib_llvm_Support_Unix_Process.inc   (contents, props changed)
  head/devel/llbuild/files/patch-products_llbuild_CMakeLists.txt   (contents, props changed)
  head/devel/llbuild/pkg-descr   (contents, props changed)
  head/devel/llbuild/pkg-plist   (contents, props changed)
Modified:
  head/devel/Makefile

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Thu Oct 26 22:14:34 2017	(r452957)
+++ head/devel/Makefile	Thu Oct 26 22:34:30 2017	(r452958)
@@ -1617,6 +1617,7 @@
     SUBDIR += lion
     SUBDIR += listserialc
     SUBDIR += liteide
+    SUBDIR += llbuild
     SUBDIR += lldb38
     SUBDIR += llnextgen
     SUBDIR += llvm-cheri

Added: head/devel/llbuild/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/llbuild/Makefile	Thu Oct 26 22:34:30 2017	(r452958)
@@ -0,0 +1,35 @@
+# $FreeBSD$
+
+PORTNAME=		llbuild
+DISTVERSIONPREFIX=	swift-DEVELOPMENT-
+DISTVERSION=		SNAPSHOT-2016-11-01
+DISTVERSIONSUFFIX=	-a
+CATEGORIES=		devel
+
+MAINTAINER=	jonathan@FreeBSD.org
+COMMENT=	Low-level build system, used by the Swift Package Manager
+
+LICENSE=	APACHE20 BSD3CLAUSE NCSA
+LICENSE_COMB=	multi
+LICENSE_FILE_APACHE20=	${WRKSRC}/LICENSE.txt
+
+BUILD_DEPENDS=	llvm-lit-devel:devel/llvm-devel
+LIB_DEPENDS=	libsqlite3.so:databases/sqlite3
+
+USES=		cmake:outsource
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	apple
+GH_PROJECT=	swift-llbuild
+
+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>

Added: head/devel/llbuild/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/llbuild/distinfo	Thu Oct 26 22:34:30 2017	(r452958)
@@ -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

Added: head/devel/llbuild/files/patch-CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/llbuild/files/patch-CMakeLists.txt	Thu Oct 26 22:34:30 2017	(r452958)
@@ -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 ()

Added: head/devel/llbuild/files/patch-cmake_modules_FindFileCheck.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/llbuild/files/patch-cmake_modules_FindFileCheck.cmake	Thu Oct 26 22:34:30 2017	(r452958)
@@ -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)

Added: head/devel/llbuild/files/patch-cmake_modules_FindLit.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/llbuild/files/patch-cmake_modules_FindLit.cmake	Thu Oct 26 22:34:30 2017	(r452958)
@@ -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-lit-devel
+              DOC "Path to 'lit' executable")
+ 
+ # Handle REQUIRED and QUIET arguments, this will also set LIT_FOUND to true

Added: head/devel/llbuild/files/patch-lib_Basic_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/llbuild/files/patch-lib_Basic_CMakeLists.txt	Thu Oct 26 22:34:30 2017	(r452958)
@@ -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()

Added: head/devel/llbuild/files/patch-lib_Ninja_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/llbuild/files/patch-lib_Ninja_CMakeLists.txt	Thu Oct 26 22:34:30 2017	(r452958)
@@ -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)

Added: head/devel/llbuild/files/patch-lib_llvm_Support_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/llbuild/files/patch-lib_llvm_Support_CMakeLists.txt	Thu Oct 26 22:34:30 2017	(r452958)
@@ -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()

Added: head/devel/llbuild/files/patch-lib_llvm_Support_Unix_Process.inc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/llbuild/files/patch-lib_llvm_Support_Unix_Process.inc	Thu Oct 26 22:34:30 2017	(r452958)
@@ -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)

Added: head/devel/llbuild/files/patch-products_llbuild_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/llbuild/files/patch-products_llbuild_CMakeLists.txt	Thu Oct 26 22:34:30 2017	(r452958)
@@ -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")

Added: head/devel/llbuild/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/llbuild/pkg-descr	Thu Oct 26 22:34:30 2017	(r452958)
@@ -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

Added: head/devel/llbuild/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/llbuild/pkg-plist	Thu Oct 26 22:34:30 2017	(r452958)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710262234.v9QMYUSo001241>