[aur-general] PKGBUILD help/critique
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.
Hi In my opinion you should try to get in touch with willem first. He also maintains a mp PKGBUILD[0] (As a split PKGBUILD). As I understand from a first glance, both are using the same source and as unnecessary duplicates should be avoided, one PKGBUILD could be merged into the other. And then the issue with ncurses could be solved. Best regards Regarding ________ [0] https://aur.archlinux.org/pkgbase/mp-5/
HI, (I forget is we are top or bottom posting in this list.) I agree with you. I had not noticed the other package. I basically took over from speps and have been in touch with upstream which has been helpful generally in adding new features, etc. The ncurses issue arises since developer uses Debian and is still on ncurses5 and does not seem to have a lot of incentive at the moment to fix the code to make it compatible with ncurses6. I will probably fix my side by building against ncurses5 source and use git for source, renaming my package mp-git. The splitting of package is not essential IMHO but the ncurses issue needs to be resolved. 14.10.2016, 08:49, "Lex Black" <autumn-wind@web.de>:
Hi
In my opinion you should try to get in touch with willem first. He also maintains a mp PKGBUILD[0] (As a split PKGBUILD). As I understand from a first glance, both are using the same source and as unnecessary duplicates should be avoided, one PKGBUILD could be merged into the other. And then the issue with ncurses could be solved.
Best regards Regarding
________ [0] https://aur.archlinux.org/pkgbase/mp-5/
participants (2)
-
Lex Black
-
stef204