You are not logged in.
OpenBSD's calendar looks like a saner replacement for remind, and I'd like to try it out. I need help mostly because I don't understand CVS. Hopefully it builds on linux. Thanks in advance.
http://www.openbsd.org/cgi-bin/cvsweb/s … /calendar/
http://www.openbsd.org/cgi-bin/man.cgi? … ormat=html
EDIT: disregard this, I don't think it builds on linux. Shame, it looks pretty good.
Last edited by fflarex (2011-02-23 14:36:43)
Offline
EDIT: disregard this, I don't think it builds on linux. Shame, it looks pretty good.
I made a small try to get it working, inspired by some other BSD port PKGBUILDs
There seems to be a couple of Bu39 errors when the makefile tries to define some stuff relating to language.
If this part of the makefile is commented out, it stops at
.include <bsd.prog.mk>
I do not see any such file in the sources that have been checked out, so it is perhaps a dependency that needs to be installed first.
I tried with the libbsd and heirloom devtools. An alternative might be bmake (https://aur.archlinux.org/packages.php?ID=18416).
This is my current PKGBUILD
pkgname=openbsd-calendar-cvs
pkgver=280211
pkgrel=1
pkgdesc="reminder service from OpenBSD"
arch=('i686' 'x86_64')
url="http://www.openbsd.org/cgi-bin/man.cgi?query=calendar"
license=('custom:BSD')
provides=('calendar')
makedepends=('cvs' 'openssh' 'heirloom-devtools-cvs' 'libbsd')
#sources=('Makefile')
#md5sums=('3989368406b9b1c1d25bc999d6c07950')
__cvsroot="anoncvs@anoncvs1.ca.openbsd.org:/cvs"
__cvsmod="calendar"
build() {
cd $srcdir
CVS_RSH=ssh cvs -d $__cvsroot get -P src/usr.bin/$__cvsmod
rm -rf build
cp -ar $srcdir/src/usr.bin/$__cvsmod build
cd build
#getting rid of some GNUisms
export PATH=/usr/heirloom/bin:$PATH
export DESTDIR=$pkgdir
# export lang= #only if you want to enable a different language. Check makefile and uncomment accordingly
# cp $startdir/Makefile $srcdir/build/Makefile
make LDLIBS=-lbsd
}
package() {
cd build
make install DESTDIR=$pkgdir
}I will try with bmake rather than heirloom and see if that helps...
Last edited by W.F.Cody (2011-03-01 20:42:26)
My AUR packages
Any package of mine is up for grabs. If you think you could mantain it better - just contact me!
Offline
Update: bmake did the trick!
... almost.
Stuff move along quite nicely now, except that it complains about two missing header files. I could unfortunately not find a package providing these header files in Arch.
I have (naively, perhaps) simply copied these files from Bionic and NetBSD libc (the parent of Bionic, hopefully nothing linux-specific needed in there).
The problem I have at the moment is to make bmake understand that the two header files exist. I have tried copying them into the build directory but that does not seem to help.
updated PKGBUILD:
pkgname=openbsd-calendar-cvs
pkgver=280211
pkgrel=1
pkgdesc="reminder service from OpenBSD"
arch=('i686' 'x86_64')
url="http://www.openbsd.org/cgi-bin/man.cgi?query=calendar"
license=('custom:BSD')
provides=('calendar')
makedepends=('cvs' 'openssh' 'bmake' 'libbsd')
sources=('tzfile.h' 'login_cap.h')
md5sum=('828a1dd4b42152580c30394cf921bd20' '71bd40d2dfd92951b84eb77e5ee19328')
__cvsroot="anoncvs@anoncvs1.ca.openbsd.org:/cvs"
__cvsmod="calendar"
build() {
cd $srcdir
CVS_RSH=ssh cvs -d $__cvsroot get -P src/usr.bin/$__cvsmod
rm -rf build
cp -ar $srcdir/src/usr.bin/$__cvsmod build
# copy missing header files to temporary build directory, taken from Android's BSD libc 'bionic'
cp $startdir/*.h $srcdir/build/
cd build
bmake LDLIBS=-lbsd
}
package() {
cd $srcdir/build
bmake install DESTDIR=$pkgdir
}update: I am currently patching .c file by .c file from <lib.h> to "lib.h" which seems to help... There should be a better way though... and I might need to find alternative header files.
update2: I decided to put it as an AUR right now so it is easier to follow the canges.
I believe that it will be possible to make it build...eventually.
https://aur.archlinux.org/packages.php?ID=47044
If you want to take over the build, just notify me and I will disown it.
Last edited by W.F.Cody (2011-03-02 05:06:33)
My AUR packages
Any package of mine is up for grabs. If you think you could mantain it better - just contact me!
Offline
After all .c files got updated to use a local header file, the next issue seems to be with "calendar.h"
If I understand the errors OK it seems like u_long, time_t and f_time are not understood. I need to check if these are written differently under linux.
EDIT: the "time" errors could be solved by including time.h in the .c files complaining
The remaining error at the moment is at row 113 in calendar.h : extern u_long julian;
this one causes errors in a number of different .c files.
Last edited by W.F.Cody (2011-03-03 05:22:21)
My AUR packages
Any package of mine is up for grabs. If you think you could mantain it better - just contact me!
Offline
time_t is defined by sys/types.h. You'll need to find yourself a copy of tzfile.h and change the #include <tzfile.h> to #include "tzfile.h" (or modify the include path). That at least gets you past compilation and onto the linking...
/home/noclaf/build/openbsd-calendar-cvs/src/build/calendar.c:173: undefined reference to `setusercontext'
day.o: In function `isnow':
/home/noclaf/build/openbsd-calendar-cvs/src/build/day.c:292: undefined reference to `arc4random_uniform'
collect2: ld returned 1 exit statusedit: arc4random_uniform isn't part of libbsd nor is it part of calendar. Going to leave this here for the night...
Last edited by falconindy (2011-03-03 04:43:14)
Offline
time_t is defined by sys/types.h. You'll need to find yourself a copy of tzfile.h and change the #include <tzfile.h> to #include "tzfile.h" (or modify the include path). That at least gets you past compilation and onto the linking...
/home/noclaf/build/openbsd-calendar-cvs/src/build/calendar.c:173: undefined reference to `setusercontext' day.o: In function `isnow': /home/noclaf/build/openbsd-calendar-cvs/src/build/day.c:292: undefined reference to `arc4random_uniform' collect2: ld returned 1 exit statusedit: arc4random_uniform isn't part of libbsd nor is it part of calendar. Going to leave this here for the night...
Thanks for helping out. I figured out the thing about changing to "tzfile.h" - hence all the small patches in my AUR linked above.
The calendar.h problem will however need some further investigation...
EDIT @falconindy
Now I have caught up with you and get the same errors:
--- calendar ---
cc -pipe -o calendar calendar.o io.o day.o pesach.o ostern.o paskha.o
calendar.o: In function `main':
/home/jens/Dev/Arch/openbsd-calendar/src/build/calendar.c:173: undefined reference to `setusercontext'
day.o: In function `isnow':
/home/jens/Dev/Arch/openbsd-calendar/src/build/day.c:292: undefined reference to `arc4random_uniform'
paskha.o: In function `paskha':
/home/jens/Dev/Arch/openbsd-calendar/src/build/paskha.c:51: undefined reference to `isleap'
collect2: ld returnerade avslutningsstatus 1
*** [calendar] Error code 1
bmake: stopped in /home/jens/Dev/Arch/openbsd-calendar/src/build
1 error
bmake: stopped in /home/jens/Dev/Arch/openbsd-calendar/src/buildI will google a bit and see if I can find a solution. My PKGBUILD (https://aur.archlinux.org/packages.php?ID=47044) is quite hacky unfortunately. Making it nicer is also on the to-do list.
Last edited by W.F.Cody (2011-03-03 18:00:47)
My AUR packages
Any package of mine is up for grabs. If you think you could mantain it better - just contact me!
Offline
edit: arc4random_uniform isn't part of libbsd nor is it part of calendar. Going to leave this here for the night...
according to this ubuntu manpage that I found, arc4random should be a part of libbsd
http://manpages.ubuntu.com/manpages/luc … dom.3.html
I wonder if I have been calling the libbsd in a wrong way or if I explicitly need to include libbsd in the .c files...
My AUR packages
Any package of mine is up for grabs. If you think you could mantain it better - just contact me!
Offline
Hmmmm, it does seem to be part of libbsd:
$ readelf -s libbsd.so.0.2.0 | grep arc4random_uniform
80: 00000000000026d3 95 FUNC GLOBAL DEFAULT 12 arc4random_uniform@@LIBBSD_0.2
228: 00000000000026d3 95 FUNC GLOBAL DEFAULT 12 arc4random_uniformThe pkg-config file included with libbsd doesn't mention any extra flags besides -lbsd (uses standard linker/include paths).
What I'm not seeing is the header that defines the prototype for arc4random_uniform (there are other arc4random exports), but if that were an issue it'd be hit by the compiler, not the linker.
Last edited by falconindy (2011-03-04 18:07:29)
Offline
Hmmmm, it does seem to be part of libbsd:
$ readelf -s libbsd.so.0.2.0 | grep arc4random_uniform 80: 00000000000026d3 95 FUNC GLOBAL DEFAULT 12 arc4random_uniform@@LIBBSD_0.2 228: 00000000000026d3 95 FUNC GLOBAL DEFAULT 12 arc4random_uniformThe pkg-config file included with libbsd doesn't mention any extra flags besides -lbsd (uses standard linker/include paths).
What I'm not seeing is the header that defines the prototype for arc4random_uniform (there are other arc4random exports), but if that were an issue it'd be hit by the compiler, not the linker.
It is very strange indeed.
I found this patch on Gentoo:
http://sources.gentoo.org/cgi-bin/viewv … iew=markup
so I figured that perhaps the arch4random_uniform is part of the API break that is mentioned in a number of depreciated header files in libbsd.
Inspired by that, I made a libbsd-git variant applying this patch:
https://aur.archlinux.org/packages.php?ID=47112
This does not seem have helped at all, since my errors are still:
--- calendar ---
cc -pipe -o calendar calendar.o io.o day.o pesach.o ostern.o paskha.o
calendar.o: In function `main':
/home/jens/Dev/Arch/openbsd-calendar/src/build/calendar.c:173: undefined reference to `setusercontext'
day.o: In function `isnow':
/home/jens/Dev/Arch/openbsd-calendar/src/build/day.c:292: undefined reference to `arc4random_uniform'
paskha.o: In function `paskha':
/home/jens/Dev/Arch/openbsd-calendar/src/build/paskha.c:51: undefined reference to `isleap'
collect2: ld returnerade avslutningsstatus 1
*** [calendar] Error code 1
bmake: stopped in /home/jens/Dev/Arch/openbsd-calendar/src/build
1 error
bmake: stopped in /home/jens/Dev/Arch/openbsd-calendar/src/build
Avbryter...EDIT: I wonder if bmake takes the argument LDLIBS and whether this might be the problem... I have tried with the variables LOADLIBES and LIBS without any change in the end result.
EDIT2: The arc4random_uniform is a known bug in libbsd
https://bugs.freedesktop.org/buglist.cg … uct=libbsd
The patch I applied above should however solve it so I am a bit confused.
EDIT3: I have experimented with changing the "bmake -LDLIBS=-lbsd"
to "bmake -LDLIBS=-lbsd CC="gcc -I /usr/include/libbsd -I /usr/include/libbsd/bsd"
This changes the outcome quite a bit, where it seems like the libbsd stuff is being used (finally). Now there seems to be issues with time.h though... sigh...
Last edited by W.F.Cody (2011-03-06 06:49:16)
My AUR packages
Any package of mine is up for grabs. If you think you could mantain it better - just contact me!
Offline
I give up on this. I really do not know what to do next to get forward on compiling this thing ![]()
I disown my AUR:
https://aur.archlinux.org/packages.php?ID=47044
If you want to try solving this one, just adopt this package.
My AUR packages
Any package of mine is up for grabs. If you think you could mantain it better - just contact me!
Offline
Thanks for the effort, anyway. I was away from the forums for a while and it's kind of surprising to me that so much effort was put into my request while I was gone.
Offline
No probs. I enjoyed the challenge and learned a few things along the way. I hope someone smarter/more experienced than me will go the extra mile to get it working for you ![]()
My AUR packages
Any package of mine is up for grabs. If you think you could mantain it better - just contact me!
Offline
Sorry about resurrecting such an old thread.
I just wanted to share that this package now builds!
https://aur.archlinux.org/packages.php?ID=47044
My AUR packages
Any package of mine is up for grabs. If you think you could mantain it better - just contact me!
Offline