pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
cannonball: Streamlined the patches to be more generic.
Module Name: pkgsrc-wip
Committed By: Santhosh Raju <fox%NetBSD.org@localhost>
Pushed By: fox
Date: Sun Aug 18 12:17:56 2019 -0500
Changeset: dc04c46ebf1aaa2a66728d17ce1739e05e99361e
Modified Files:
cannonball/Makefile
cannonball/distinfo
cannonball/patches/patch-cmake_CMakeLists.txt
cannonball/patches/patch-cmake_bsd.cmake
Log Message:
cannonball: Streamlined the patches to be more generic.
1. Updated the patches to be generic enough to include the BSDs.
Upstream of patches have been requested with the maintainer.
2. Removed debug stuff from Makefile
3. Tested builds in Linux and NetBSD.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=dc04c46ebf1aaa2a66728d17ce1739e05e99361e
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
cannonball/Makefile | 16 +++++----------
cannonball/distinfo | 4 ++--
cannonball/patches/patch-cmake_CMakeLists.txt | 28 +++++++++++++++++++++------
cannonball/patches/patch-cmake_bsd.cmake | 14 ++++++++------
4 files changed, 37 insertions(+), 25 deletions(-)
diffs:
diff --git a/cannonball/Makefile b/cannonball/Makefile
index 4b79a22702..12e193db27 100644
--- a/cannonball/Makefile
+++ b/cannonball/Makefile
@@ -15,24 +15,18 @@ USE_LANGUAGES= c c++
USE_TOOLS+= pkg-config
USE_CMAKE= yes
CONFIGURE_DIRS= build
-CMAKE_ARG_PATH= ..
-BUILD_MAKE_FLAGS+= VERBOSE=1
+CMAKE_ARG_PATH= ${WRKSRC}/cmake
+CMAKE_ARGS.Linux+= -DTARGET=debian
+CMAKE_ARGS.NetBSD+= -G "Unix Makefiles"
+CMAKE_ARGS.NetBSD+= -DTARGET=bsd
+CMAKE_ARGS.NetBSD+= -DBSD_PREFIX_PATH:STRING=${PREFIX}
INSTALLATION_DIRS+= bin libexec share/cannonball share/cannonball/res \
share/cannonball/conf ${PKGMANDIR}/man6
-SUBST_CLASSES+= prefix
-SUBST_STAGE.prefix= pre-configure
-SUBST_MESSAGE.prefix= Set correct prefix in bsd.cmake
-SUBST_FILES.prefix= ${WRKSRC}/cmake/bsd.cmake
-SUBST_VARS.prefix= PREFIX
-
pre-configure:
${MKDIR} ${WRKSRC}/build
-do-configure:
- cd ${WRKSRC}/build && cmake -G "Unix Makefiles" -DTARGET=bsd ${WRKSRC}/cmake
-
post-build:
${SED} -e 's,@PREFIX@,${PREFIX},g' < ${FILESDIR}/cannonball.sh.in > \
${WRKDIR}/cannonball.sh
diff --git a/cannonball/distinfo b/cannonball/distinfo
index 60ebea59f9..43ce3313c6 100644
--- a/cannonball/distinfo
+++ b/cannonball/distinfo
@@ -4,5 +4,5 @@ SHA1 (cannonball-0.3.20171201-0c0814d8233ee4e5be7beb309b8e16e0eecbb2e6.tar.gz) =
RMD160 (cannonball-0.3.20171201-0c0814d8233ee4e5be7beb309b8e16e0eecbb2e6.tar.gz) = 79f33565344ec4f5b6d37ff0967c033ea8751bba
SHA512 (cannonball-0.3.20171201-0c0814d8233ee4e5be7beb309b8e16e0eecbb2e6.tar.gz) = b387e1d855c7949a9685d0fc9dac1a917962e2a1679a0ef5813f0efe6a936e5e25e57ccd80d54f28384c390a74f0285f40c673d2294c24693a52cb52ece80de0
Size (cannonball-0.3.20171201-0c0814d8233ee4e5be7beb309b8e16e0eecbb2e6.tar.gz) = 277449 bytes
-SHA1 (patch-cmake_CMakeLists.txt) = 1776821704ccf44ef788f1a64b8e65903465b0db
-SHA1 (patch-cmake_bsd.cmake) = c331da7ef49e2351395959da641cd7ec0847bd38
+SHA1 (patch-cmake_CMakeLists.txt) = bc474aa576a9d28fc2569f9c9c19b2a3808d5ddd
+SHA1 (patch-cmake_bsd.cmake) = 74fe1f8d35b7712ea69232971e37bfb6c48dec16
diff --git a/cannonball/patches/patch-cmake_CMakeLists.txt b/cannonball/patches/patch-cmake_CMakeLists.txt
index a5b2159daa..31dc3dd46f 100644
--- a/cannonball/patches/patch-cmake_CMakeLists.txt
+++ b/cannonball/patches/patch-cmake_CMakeLists.txt
@@ -1,18 +1,34 @@
$NetBSD$
-Remove the boost directory reference.
+Adds support for BSD based builds.
-Not required in pkgsrc, since boost libraries are directly installed
-in ${PREFIX}/include
+1. PREFIX path is configured via BSD_PREFIX_PATH for BSDs.
---- cmake/CMakeLists.txt.orig 2019-06-09 15:46:42.350731953 +0000
+2. Boost include directory is set from bsd.cmake for BSDs.
+
+--- cmake/CMakeLists.txt.orig 2019-08-18 00:42:17.620253273 +0000
+++ cmake/CMakeLists.txt
-@@ -25,7 +25,7 @@ else()
+@@ -20,12 +20,22 @@ if(TARGET)
+ message("CMake files for ${TARGET} not found, using ${DCMAKE}")
+ include(${DCMAKE})
+ endif()
++ if(${TARGET} STREQUAL "bsd")
++ if(NOT DEFINED BSD_PREFIX_PATH)
++ message(FATAL_ERROR "Warning: BSD_PREFIX_PATH Variable Not Defined!")
++ else()
++ message("Setting ${BSD_PREFIX_PATH} as the prefix path.")
++ endif()
++ endif()
+ else()
+ message("TARGET not passed, using ${DCMAKE}")
include(${DCMAKE})
endif(TARGET)
-set(BOOST_INCLUDEDIR ${lib_base}/boost_1_54_0)
-+set(BOOST_INCLUDEDIR ${lib_base})
++if(NOT(${TARGET} STREQUAL "bsd"))
++ set(BOOST_INCLUDEDIR ${lib_base}/boost_1_54_0)
++endif()
++
find_package(Boost REQUIRED)
# Include
diff --git a/cannonball/patches/patch-cmake_bsd.cmake b/cannonball/patches/patch-cmake_bsd.cmake
index 44d0168350..6e6bebc929 100644
--- a/cannonball/patches/patch-cmake_bsd.cmake
+++ b/cannonball/patches/patch-cmake_bsd.cmake
@@ -1,13 +1,15 @@
$NetBSD$
-Create a cmake file for NetBSD build.
+Create a cmake file for BSD based builds.
---- cmake/bsd.cmake.orig 2019-06-09 15:29:08.087446737 +0000
+--- cmake/bsd.cmake.orig 2019-08-18 00:41:57.311525123 +0000
+++ cmake/bsd.cmake
-@@ -0,0 +1,21 @@
-+# Default CMake Setup. Used for NetBSD Builds.
+@@ -0,0 +1,23 @@
++# Default CMake Setup. Used for BSD Builds.
+
-+set(lib_base @PREFIX@/include)
++set(lib_base ${BSD_PREFIX_PATH}/include)
++
++set(BOOST_INCLUDEDIR ${lib_base})
+
+set(sdl_root ${lib_base}/SDL)
+
@@ -19,7 +21,7 @@ Create a cmake file for NetBSD build.
+
+# Linking
+link_directories(
-+ "@PREFIX@/lib"
++ "${BSD_PREFIX_PATH}/lib"
+)
+
+# Location for Cannonball to create save files
Home |
Main Index |
Thread Index |
Old Index