summaryrefslogtreecommitdiff
path: root/news/neix
diff options
context:
space:
mode:
authorgutteridge <gutteridge@pkgsrc.org>2021-02-07 05:06:12 +0000
committergutteridge <gutteridge@pkgsrc.org>2021-02-07 05:06:12 +0000
commitea1070e4ca78fe7f588c8ebd7b17caa42c660efa (patch)
tree8bfc9b73ade9a27757fb821b8af11723dcebb782 /news/neix
parentbb0614f932d41dd33bd39abde6378a524809a8f2 (diff)
downloadpkgsrc-ea1070e4ca78fe7f588c8ebd7b17caa42c660efa.tar.gz
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 (limited to 'news/neix')
-rw-r--r--news/neix/Makefile5
-rw-r--r--news/neix/distinfo4
-rw-r--r--news/neix/patches/patch-CMakeLists.txt43
-rw-r--r--news/neix/patches/patch-src_main.cpp16
4 files changed, 65 insertions, 3 deletions
diff --git a/news/neix/Makefile b/news/neix/Makefile
index a56c64b7b1c..3a746d94139 100644
--- a/news/neix/Makefile
+++ b/news/neix/Makefile
@@ -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 @@ LICENSE= gnu-gpl-v3
USE_CMAKE= yes
USE_TOOLS+= pkg-config gmake
-USE_LANGUAGES= c c++
+USE_LANGUAGES= c c++11
CONFIGURE_DIRS= build
CMAKE_ARG_PATH= ..
diff --git a/news/neix/distinfo b/news/neix/distinfo
index 6f29653233d..983efd84887 100644
--- a/news/neix/distinfo
+++ b/news/neix/distinfo
@@ -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 --git a/news/neix/patches/patch-CMakeLists.txt b/news/neix/patches/patch-CMakeLists.txt
new file mode 100644
index 00000000000..c3f73fbcfd7
--- /dev/null
+++ b/news/neix/patches/patch-CMakeLists.txt
@@ -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 --git a/news/neix/patches/patch-src_main.cpp b/news/neix/patches/patch-src_main.cpp
new file mode 100644
index 00000000000..4cc014dd2e5
--- /dev/null
+++ b/news/neix/patches/patch-src_main.cpp
@@ -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;
+