[aur-general] PKGBUILD help/critique
stef204
stef204 at yandex.com
Wed Oct 5 21:01:51 UTC 2016
Link to PKGBUILD: <https://gist.github.com/stef204/78efbb7c46941d8f08ff6f3550b3fa26#file-pkgbuild>
AUR package name: "mp" (short for "Minimum Profit", a text editor which can use ncurses, qt4 or gtk, as interfaces.)
Hi,
Please bear with me as I am fairly new at this. Only maintaining a few AUR packages.
I have 2 issues to resolve with this package, 1) ncurses 2) making it into a split package.
*Issue 1 (the most important/difficult):*
Since last year's upgrade to ncurses 6 on Arch, mp's syntax highlighting breaks (in curses only) and I cannot get it fixed upstream for various reasons.
So, the solution is for me to build this (the ncurses part) using 'ncurses5-compat-libs' in AUR.
I have added 'ncurses5-compat-libs' as a dependency in PKGBUILD, however, this is far from enough as it still builds against ncurses 6:
% ldd mp-curses
linux-vdso.so.1 (0x00007fff6bd2b000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007ffa6cf7f000)
libncursesw.so.6 => /usr/lib/libncursesw.so.6 (0x00007ffa6cd12000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007ffa6caf5000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007ffa6c757000)
/lib64/ld-linux-x86-64.so.2 (0x00007ffa6d283000)
I believe the makefile or config script checks user's system for ncurses, detects version 6, so build against it by default.
So, I need to either use the "config.sh" in source (see at end of this message) to configure using ncurses5 (mainly libncursesw.so.5.9 I suppose, but that is all installed by 'ncurses5-compat-libs'.)
Or, I *might* be able to use the CFLAGS (see "config.sh --help" below) but not sure if possible nor how.
I have also looked at the "buildflags" option in the PKGBUILD manual but can't really see how to use it in this context.
<https://www.archlinux.org/pacman/PKGBUILD.5.html>
Instead of the above, I might have to use some kind of text/string editing line in the PKGBUILD to change LDFLAGS (which are inside config.sh) or something of the sort.
The source has files config.ldflags and config.cflags which I believe are echoed inside config.sh but not sure about all of this..
Would really appreciate some help. (A link to an existing PKGBUILD would be fine as well, if you know of one having to build versus 'ncurses5-compat-libs' might help.)
This is the --help option of the config script provided by package to configure before "make".
% ./config.sh --help
Available options:
--prefix=PREFIX Installation prefix (/usr/local).
--without-curses Disable curses (text) interface detection.
--without-gtk Disable GTK interface detection.
--without-win32 Disable win32 interface detection.
--with-kde4 Enable KDE4 interface detection.
--without-qt4 Disable Qt4 interface detection.
--without-unix-glob Disable glob.h usage (use workaround).
--with-included-regex Use included regex code (gnu_regex.c).
--with-pcre Enable PCRE library detection.
--without-gettext Disable gettext usage.
--without-iconv Disable iconv usage.
--without-wcwidth Disable system wcwidth() (use workaround).
--with-null-hash Tell MPDM to use a NULL hashing function.
--mingw32 Build using the mingw32 compiler.
--debian Build for Debian ('make deb').
Environment variables:
CC C Compiler.
AR Library Archiver.
CFLAGS Compile flags (i.e., -O3).
WINDRES MS Windows resource compiler.
*Issue 2:*
Also, as a second step, I think this should be a split package so I imagine:
"pkgname=('mp' 'mp-qt' 'mp-gtk')"
instead of just
"pkgname=mp"
And
package_mp()
package_mp-gtk()
package_mp-qt()
instead of the single package() function, etc.
But I am more concerned about the ncurses issue and would like to solve that first.
Would appreciate if anyone could offer helpful feedback.
Thanks.
More information about the aur-general
mailing list