You are not logged in.

#1 2014-03-14 01:35:49

gunther
Member
Registered: 2014-03-14
Posts: 6

gretl - first PKGBUIILD submission

Hello everyone.
I couldn't build gretl because in the source there is a cast to a deprecated type, no longer provided by its dependency readline (see here); I wrote a comment on that in the gretl AUR page.

I took a fresh source and modified the PKGBUILD:

# Contributor: Minh Nguyen <manehi@gmail.com>
# Contributor: Rachele Grasshopper <rachele@logorroici.org>
pkgname=gretl
pkgver=1.9.14
pkgrel=1
pkgdesc="Gnu Regression, Econometrics and Time-series Library"
arch=('x86_64')
url="http://gretl.sourceforge.net/"
license=('GPL')
depends=(blas gtksourceview2 fftw gnuplot)
makedepends=(lapack gcc)
optdepends=('libgnomeui: gnome UI integration' 'libgnomeprintui: gnome print integration')
options=(!libtool)
source=(http://prdownloads.sourceforge.net/gretl/$pkgname-$pkgver.tar.xz $pkgname-$pkgver.patch)
md5sums=('dc5eae84b48af29b9de98a0e75b5bf05'
         'ff21c5cc314eaa6bb598554b8d8d7463')

prepare() {
	cp "$pkgname-$pkgver.patch" "$srcdir/$pkgname-$pkgver/$pkgname-$pkgver.patch"
	cd "$srcdir/$pkgname-$pkgver"
	patch -p0 < "$srcdir/$pkgname-$pkgver.patch"
}

build() {
	cd "$srcdir/$pkgname-$pkgver"
	#./configure --prefix=/usr --enable-openmp --with-odbc
	./configure --prefix=/usr
	make
}

check() {
	cd "$srcdir/$pkgname-$pkgver"
	make check
}

package() {
	cd "$srcdir/$pkgname-$pkgver"
	make DESTDIR="$pkgdir/" install
}

and here is the patch (I just removed the cast):

--- cli/complete.c	2014-03-14 00:39:10.049047358 +0100
+++ cli/complete.c.pecciata	2014-03-14 00:39:19.348996976 +0100
@@ -126,6 +126,6 @@
     rl_readline_name = "gretl";
 
     /* Tell the completer that we want a crack first. */
-    rl_attempted_completion_function = (CPPFunction *) gretl_completion;
+    rl_attempted_completion_function = gretl_completion;
 }

It now works for me, but I tested only in x86_64 architecture.

I'd like any suggestion and corrections; also, I am not sure this submission can be useful to someone, but in that case, how do we proceed?

Thanks in advance,
peace smile

Offline

#2 2014-03-14 01:55:56

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 5,126

Re: gretl - first PKGBUIILD submission

You shouldn't need to copy the patch, get rid of that line.

The package is an orphan in the AUR, which means you should be able to upload your new one and everything will be fine. Ideally, that patch should go upstream as well.

Offline

#3 2014-03-14 10:19:40

gunther
Member
Registered: 2014-03-14
Posts: 6

Re: gretl - first PKGBUIILD submission

Scimmia wrote:

You shouldn't need to copy the patch, get rid of that line.

Yes, you're right: it works the same.

Scimmia wrote:

The package is an orphan in the AUR, which means you should be able to upload your new one and everything will be fine. Ideally, that patch should go upstream as well.

Are you saying I am able to submit the PKGBUILD+patch tarball?

I fear I'm too n00b for this, but if you say it could be useful, I'll then submit the package. I was asking here before submitting to AUR because of this rule:

If you are unsure about the package (or the build/submission process) in any way, submit the PKGBUILD to the AUR mailing list or the AUR forum on the Arch forums for public review before adding it to the AUR.

Finally, I thought this PKGBUILD had to be tested against i686 architecture at least before it is submitted; I only inserted x86_64 in the arch array because this was the only architecture I have.

cheers

Offline

#4 2014-03-14 13:49:12

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 4,404

Re: gretl - first PKGBUIILD submission

gunther wrote:

Finally, I thought this PKGBUILD had to be tested against i686 architecture at least before it is submitted; I only inserted x86_64 in the arch array because this was the only architecture I have.

Often there are changes needed to make a package work on both x86_64 and i686,
Imo it's good practice to only list architectures on which the package has been tested.
Once people that use i686 show interest in the package, you can ask them for help with testing necessary changes.

Sometimes this never happens ofcourse, f.e. my mesa-r*-git aur pacakge is still x86_64 only ,
as no one has asked for an i686 version of it in the approx 3 years since i submitted the first version of it.


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#5 2014-03-14 15:39:05

gunther
Member
Registered: 2014-03-14
Posts: 6

Re: gretl - first PKGBUIILD submission

Okay, thanks for your replies!
I submitted the package here but it now shows me as the mantainer; is it a normal behavior?

Offline

#6 2014-03-14 16:12:12

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 4,404

Re: gretl - first PKGBUIILD submission

yes, by uploading an updated version for an orphaned package you automatically become the maintainer.

You should add your own name to the PKGBUILD as maintainer.
If at some point in he future you want to stop maintaining the package,  just disown it.


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#7 2014-03-14 16:38:36

gunther
Member
Registered: 2014-03-14
Posts: 6

Re: gretl - first PKGBUIILD submission

Lone_Wolf wrote:

You should add your own name to the PKGBUILD as maintainer.

Okay I'll do that, but as pointed out before I feel really n00b and hope someone more skilled than me will come in help wink

While installing the package from AUR I checked with namcap and got this:

gretl E: Files in /usr/share/icons/hicolor but no call to gtk-update-icon-cache or xdg-icon-resource to update the icon cache
gretl W: Directory (usr/share/gretl/doc) is empty
gretl E: Mime-file found. Add "update-mime-database usr/share/mime" to the install file
gretl W: File (usr/share/gretl/data/misc/galton.gdt) does not have the world readable bit set.
gretl E: Mime type handler found. Add "update-desktop-database -q" to the install file
gretl E: Dependency curl detected and not included (libraries ['usr/lib/libcurl.so.4'] needed in files ['usr/lib/gretl-gtk3/sas_import.so', 'usr/lib/gretl-gtk3/garch.so', 'usr/lib/gretl-gtk3/duration.so', 'usr/lib/gretl-gtk3/range-mean.so', 'usr/lib/gretl-gtk3/interval.so', 'usr/lib/gretl-gtk3/jmulti_import.so', 'usr/lib/gretl-gtk3/mailer.so', 'usr/lib/gretl-gtk3/nistcheck.so', 'usr/lib/gretl-gtk3/mp_ols.so', 'usr/lib/gretl-gtk3/quantreg.so', 'usr/lib/gretl-gtk3/interpolate.so', 'usr/lib/gretl-gtk3/gnumeric_import.so', 'usr/lib/gretl-gtk3/heckit.so', 'usr/lib/gretl-gtk3/ods_import.so', 'usr/lib/gretl-gtk3/leverage.so', 'usr/lib/gretl-gtk3/vif.so', 'usr/lib/gretl-gtk3/odbc_import.so', 'usr/lib/gretl-gtk3/fractals.so', 'usr/lib/gretl-gtk3/excel_import.so', 'usr/lib/gretl-gtk3/arma.so', 'usr/lib/gretl-gtk3/gretlzip.so', 'usr/lib/gretl-gtk3/urcdist.so', 'usr/lib/libgretl-1.0.so.9.0.0', 'usr/lib/gretl-gtk3/arma_x12.so', 'usr/lib/gretl-gtk3/eviews_import.so', 'usr/lib/gretl-gtk3/biprobit.so', 'usr/lib/gretl-gtk3/poisson.so', 'usr/lib/gretl-gtk3/anova.so', 'usr/lib/gretl-gtk3/stata_import.so', 'usr/lib/gretl-gtk3/tramo-x12a.so', 'usr/lib/gretl-gtk3/xlsx_import.so', 'usr/lib/gretl-gtk3/spss_import.so', 'usr/lib/gretl-gtk3/kernel.so', 'usr/lib/gretl-gtk3/pca.so', 'usr/lib/gretl-gtk3/johansen.so', 'usr/lib/gretl-gtk3/reprobit.so', 'usr/lib/gretl-gtk3/stats_tables.so', 'usr/lib/gretl-gtk3/panurc.so', 'usr/lib/gretl-gtk3/sysest.so', 'usr/lib/gretl-gtk3/arbond.so'])
gretl E: Dependency lapack detected and not included (libraries ['usr/lib/liblapack.so'] needed in files ['usr/lib/gretl-gtk3/sas_import.so', 'usr/lib/gretl-gtk3/garch.so', 'usr/lib/gretl-gtk3/duration.so', 'usr/lib/gretl-gtk3/range-mean.so', 'usr/lib/gretl-gtk3/interval.so', 'usr/lib/gretl-gtk3/jmulti_import.so', 'usr/lib/gretl-gtk3/mailer.so', 'usr/lib/gretl-gtk3/nistcheck.so', 'usr/lib/gretl-gtk3/mp_ols.so', 'usr/lib/gretl-gtk3/quantreg.so', 'usr/lib/gretl-gtk3/interpolate.so', 'usr/lib/gretl-gtk3/gnumeric_import.so', 'usr/lib/gretl-gtk3/heckit.so', 'usr/lib/gretl-gtk3/ods_import.so', 'usr/lib/gretl-gtk3/leverage.so', 'usr/lib/gretl-gtk3/vif.so', 'usr/lib/gretl-gtk3/odbc_import.so', 'usr/lib/gretl-gtk3/fractals.so', 'usr/lib/gretl-gtk3/excel_import.so', 'usr/lib/gretl-gtk3/arma.so', 'usr/lib/gretl-gtk3/gretlzip.so', 'usr/lib/gretl-gtk3/urcdist.so', 'usr/lib/libgretl-1.0.so.9.0.0', 'usr/lib/gretl-gtk3/arma_x12.so', 'usr/lib/gretl-gtk3/eviews_import.so', 'usr/lib/gretl-gtk3/biprobit.so', 'usr/lib/gretl-gtk3/poisson.so', 'usr/lib/gretl-gtk3/anova.so', 'usr/lib/gretl-gtk3/stata_import.so', 'usr/lib/gretl-gtk3/tramo-x12a.so', 'usr/lib/gretl-gtk3/xlsx_import.so', 'usr/lib/gretl-gtk3/spss_import.so', 'usr/lib/gretl-gtk3/kernel.so', 'usr/lib/gretl-gtk3/pca.so', 'usr/lib/gretl-gtk3/johansen.so', 'usr/lib/gretl-gtk3/reprobit.so', 'usr/lib/gretl-gtk3/stats_tables.so', 'usr/lib/gretl-gtk3/panurc.so', 'usr/lib/gretl-gtk3/sysest.so', 'usr/lib/gretl-gtk3/arbond.so'])
gretl E: Dependency mpfr detected and not included (libraries ['usr/lib/libmpfr.so.4'] needed in files ['usr/lib/gretl-gtk3/mp_ols.so'])
gretl E: Dependency gtksourceview3 detected and not included (libraries ['usr/lib/libgtksourceview-3.0.so.1'] needed in files ['usr/bin/gretl_x11'])
gretl E: Dependency unixodbc detected and not included (libraries ['usr/lib/libodbc.so.2'] needed in files ['usr/lib/gretl-gtk3/odbc_import.so'])

so I updated some required and optional dependencies and posted a new PKGBUILD with incremented pkgrel.

Offline

#8 2014-03-14 16:57:09

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 4,404

Re: gretl - first PKGBUIILD submission

Gunther, maintaining an aur package is easier then it may look at first.

Sofar you found a problem building the package, tracked the bug down, and patched it.
You also used namcap to improve your package, imo you've made a great start becoming a good package maintainer.

You should contact gretl upstream about your patch, they may not yet be aware of the problem with readline 6.3 .


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#9 2014-03-14 17:37:33

gunther
Member
Registered: 2014-03-14
Posts: 6

Re: gretl - first PKGBUIILD submission

@Lone_Wolf: thanks, you're a great motivator! wink

Running namcap on pkgver 2 now I get

gretl E: Mime-file found. Add "update-mime-database usr/share/mime" to the install file
gretl E: Files in /usr/share/icons/hicolor but no call to gtk-update-icon-cache or xdg-icon-resource to update the icon cache
gretl W: Directory (usr/share/gretl/doc) is empty
gretl W: File (usr/share/gretl/data/misc/galton.gdt) does not have the world readable bit set.
gretl E: Mime type handler found. Add "update-desktop-database -q" to the install file
gretl W: Dependency gtksourceview3 detected but optional (libraries ['usr/lib/libgtksourceview-3.0.so.1'] needed in files ['usr/bin/gretl_x11'])
gretl W: Dependency blas included but already satisfied
gretl W: Dependency gtk2 included but already satisfied
gretl W: Dependency gmp included but already satisfied

In particular the last three warnings: I don't understand. Are these dependencies satisfied recursively by some others in my PKGBUILD?

Offline

#10 2014-03-14 17:47:06

karol
Archivist
Registered: 2009-05-06
Posts: 25,432

Re: gretl - first PKGBUIILD submission

gnuplot depends on gmp and gtk2.
lapack depends on blas.

Offline

#11 2014-03-15 10:47:06

gunther
Member
Registered: 2014-03-14
Posts: 6

Re: gretl - first PKGBUIILD submission

Thanks, you're right. Fixed in pkrel 3.

Offline

#12 2014-03-15 12:29:14

karol
Archivist
Registered: 2009-05-06
Posts: 25,432

Re: gretl - first PKGBUIILD submission

Is there any tool that can help with this besides pactree?

#!/bin/bash

for i in blas gtk2 gmp; do
  pactree -srul $i | grep -e "^$i$" $(for i in curl fftw gnuplot gtksourceview3 lapack mpfr unixodbc; do  echo -n " -e ^$i$"; done)
  echo -en "\n"
done
$ ./find_duplicate_dependencies
blas
lapack

gtk2
gnuplot

gmp
curl
gnuplot
gtksourceview3
mpfr

I'm sure there's a cleaner and more effective way of doing this.

Offline

Board footer

Powered by FluxBB