pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/news/neix neix: various build fixes



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7d5e4a3a4c4e
branches:  trunk
changeset: 446339:7d5e4a3a4c4e
user:      gutteridge <gutteridge%pkgsrc.org@localhost>
date:      Sun Feb 07 05:06:12 2021 +0000

description:
neix: various build fixes

Don't hard-code the build environment's $HOME as the basis for the default
user configuration path, and use consistent means to check for this path.
Don't install configuration files in $HOME during the build. This package
also expects C++11.

diffstat:

 news/neix/Makefile                     |   5 ++-
 news/neix/distinfo                     |   4 ++-
 news/neix/patches/patch-CMakeLists.txt |  43 ++++++++++++++++++++++++++++++++++
 news/neix/patches/patch-src_main.cpp   |  16 ++++++++++++
 4 files changed, 65 insertions(+), 3 deletions(-)

diffs (101 lines):

diff -r f41167af7475 -r 7d5e4a3a4c4e news/neix/Makefile
--- a/news/neix/Makefile        Sun Feb 07 01:21:29 2021 +0000
+++ b/news/neix/Makefile        Sun Feb 07 05:06:12 2021 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.1 2021/01/06 18:08:53 pin Exp $
+# $NetBSD: Makefile,v 1.2 2021/02/07 05:06:12 gutteridge Exp $
 
 DISTNAME=      neix-0.1.3
+PKGREVISION=   1
 CATEGORIES=    news
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=tomschwarz/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}
@@ -12,7 +13,7 @@
 
 USE_CMAKE=     yes
 USE_TOOLS+=    pkg-config gmake
-USE_LANGUAGES= c c++
+USE_LANGUAGES= c c++11
 
 CONFIGURE_DIRS=        build
 CMAKE_ARG_PATH=        ..
diff -r f41167af7475 -r 7d5e4a3a4c4e news/neix/distinfo
--- a/news/neix/distinfo        Sun Feb 07 01:21:29 2021 +0000
+++ b/news/neix/distinfo        Sun Feb 07 05:06:12 2021 +0000
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.1 2021/01/06 18:08:53 pin Exp $
+$NetBSD: distinfo,v 1.2 2021/02/07 05:06:12 gutteridge Exp $
 
 SHA1 (neix-0.1.3.tar.gz) = 8f6902fa54b178d8b3c4fa5f99afe072fa3a91a7
 RMD160 (neix-0.1.3.tar.gz) = 17d60fac3f5ae8846433095448b44a78d2278a06
 SHA512 (neix-0.1.3.tar.gz) = 34bbb32ace34a32785a1f6ad9524532a5a98bf2f33b0ce2aaec3e2e5389a4171050100c47fbef7ee83ba044d163e7f39498e6fe32bc343d4772833b195a55cd3
 Size (neix-0.1.3.tar.gz) = 20161083 bytes
+SHA1 (patch-CMakeLists.txt) = dd830009a096010d9f4567575b1198e271426d16
+SHA1 (patch-src_main.cpp) = d8b5512b94300f05fba0328fff4375f0cd15a169
diff -r f41167af7475 -r 7d5e4a3a4c4e news/neix/patches/patch-CMakeLists.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/news/neix/patches/patch-CMakeLists.txt    Sun Feb 07 05:06:12 2021 +0000
@@ -0,0 +1,43 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2021/02/07 05:06:12 gutteridge Exp $
+
+Don't install configuration files in $HOME during the build.
+Don't hard-code the build environment's $HOME as the basis for the default
+user configuration path.
+
+--- CMakeLists.txt.orig        2020-09-07 19:55:08.000000000 +0000
++++ CMakeLists.txt
+@@ -22,19 +22,6 @@ SET(CURSES_NEED_NCURSES TRUE)
+ find_package(Curses REQUIRED)
+ include_directories(${CURSES_INCLUDE_DIRS})
+ 
+-# Prepare filesystem for installation
+-file(MAKE_DIRECTORY $ENV{HOME}/.config/neix/)
+-
+-# Check for main config file
+-if(NOT EXISTS "$ENV{HOME}/.config/neix/neix.conf")
+-    configure_file(./config/neix.conf $ENV{HOME}/.config/neix/neix.conf)
+-endif()
+-
+-# Check for feed config file
+-if(NOT EXISTS "$ENV{HOME}/.config/neix/feeds.conf")
+-    configure_file(./config/feeds.conf $ENV{HOME}/.config/neix/feeds.conf)
+-endif()
+-
+ # Version
+ set(neixVersion "0.1.3")
+ add_compile_definitions(VERSION="v${neixVersion}")
+@@ -47,14 +34,6 @@ add_compile_definitions(NEIX_USER_AGENT=
+ add_compile_definitions(DEFAULT_MAIN_CONFIG="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/neix/neix.conf")
+ add_compile_definitions(DEFAULT_FEEDS_CONFIG="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/neix/feeds.conf")
+ 
+-# Path for main neix config file
+-set(MainConfigPath "$ENV{HOME}/.config/neix/neix.conf")
+-add_compile_definitions(MAIN_CONFIG_PATH="${MainConfigPath}")
+-
+-# Path for feed config file
+-set(FeedConfigPath "$ENV{HOME}/.config/neix/feeds.conf")
+-add_compile_definitions(FEED_CONFIG_PATH="${FeedConfigPath}")
+-
+ set(CMAKE_CXX_STANDARD 11)
+ set(CMAKE_CXX_EXTENSIONS OFF)
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
diff -r f41167af7475 -r 7d5e4a3a4c4e news/neix/patches/patch-src_main.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/news/neix/patches/patch-src_main.cpp      Sun Feb 07 05:06:12 2021 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_main.cpp,v 1.1 2021/02/07 05:06:12 gutteridge Exp $
+
+Consistently determine the user's configuration path at runtime, don't use a
+hard-coded value that was defined as the build environment's $HOME.
+
+--- src/main.cpp.orig  2020-09-07 19:55:08.000000000 +0000
++++ src/main.cpp
+@@ -35,7 +35,7 @@ void processArguments(int argc, char **a
+ 
+             case 'i':
+                 cout << prefix << "Import feeds from: " << optarg << endl;
+-                imported = opml::import(optarg, FEED_CONFIG_PATH);
++                imported = opml::import(optarg, getFeedConfigPath());
+                 cout << prefix << imported << " feed(s) was imported" << endl;
+                 break;
+ 



Home | Main Index | Thread Index | Old Index