DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 7th September 2009
backrow backrow is offline
Real Name: Anthony J. Bentley
Shell Scout
 
Join Date: Jul 2009
Location: Albuquerque, NM
Posts: 116
Thanked 10 Times in 4 Posts
Default Creating port

Hi guys,

After the recent thread on ports@ I thought porting some programs I use frequently might be useful (not least because it would make installing them after a clean upgrade much easier). I started with a Game Boy emulator, following Bernd’s tutorial for the most part, and also comparing with the makefile of emulators/scummvm.

In this one, the binary installs fine but the man page doesn’t. Any advice?

Code:
# make fake
===>  Faking installation for gambatte-0.4.1
install -c -s -o root -g bin -m 555 /usr/ports/obj/gambatte-0.4.1/gambatte_src-0
.4.1/gambatte_sdl/gambatte_sdl /usr/ports/obj/gambatte-0.4.1/fake-i386/usr/local
/bin
install -c -o root -g bin -m 444 /usr/ports/obj/gambatte-0.4.1/gambatte_src-0.4.
1/gambatte_sdl/man/gambatte_sdl.6  /usr/ports/obj/gambatte-0.4.1/fake-i386/usr/l
ocal/man/man6
# make install
# man gambatte_sdl
man: no entry for gambatte_sdl in the manual.
# ls /usr/local/man/man6/
# gambatte_sdl
Gambatte SDL 0.4.1
Usage: gambatte_sdl [OPTION]... romfile
Attached Files
File Type: gz gambatte.tar.gz (1.3 KB, 2 views)
Reply With Quote
  #2   (View Single Post)  
Old 7th September 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

Looks like you forgot to add it to your PLIST file.

Code:
--- PLIST.orig	Mon Sep  7 06:50:07 2009
+++ PLIST	Mon Sep  7 06:51:06 2009
@@ -1,2 +1,3 @@
 @comment $OpenBSD$
 @bin bin/gambatte_sdl
+@man man/man6/gambatte_sdl.6
Perhaps you should check and see if anything else should be installed besides the program executable and a single man page..

Good luck, porting is fun eh?
Reply With Quote
  #3   (View Single Post)  
Old 7th September 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

Just took a look around your port, I have a few comments.
  • Change the license line Makefile to indicate the version of the GPL the program is under, GPLv2/GPLv2+ or GPLv3.. etc.
  • SCons Handling is a little nasty, fortunately there is a better way to handle it in the ports system.. you can refer to port-modules(5) for more information, and you can search the tree for other ports using it for further reference.
  • There is an extra newline at the end of Makefile, and I'd be very weary about compiling with -fomit-frame-pointer and no debug symbols.
That's all I can see for now, but as well as the other man page mentioned.. be sure to read bsd.port.mk(5) for further insights into the ports system.

Hope that helps.
Reply With Quote
  #4   (View Single Post)  
Old 7th September 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,610
Thanked 214 Times in 189 Posts
Default

You can have make(1) automatically create or update your port's PLIST contents, so that missing a man page or other content can be avoided. See steps 4, 18, and 23 of the Porting Checklist:

www.openbsd.org/checklist.html
Reply With Quote
  #5   (View Single Post)  
Old 7th September 2009
backrow backrow is offline
Real Name: Anthony J. Bentley
Shell Scout
 
Join Date: Jul 2009
Location: Albuquerque, NM
Posts: 116
Thanked 10 Times in 4 Posts
Default

Hi guys,

One “make plist” later and the manpage is added to pkg/PLIST, but rebuilding the port still doesn’t seem to install said manpage. Am I missing something?
Attached Files
File Type: gz gambatte.tar.gz (1.5 KB, 2 views)
Reply With Quote
  #6   (View Single Post)  
Old 7th September 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

The problem here is that libgambatte and gambatte_sdl are separate projects, if you read scons(1) you'll see that the -C operand doesn't work the way that you intended.

The following seems to work.. and it's a little cleaner, but please considering posting to the list for further critiquing from qualified eyes.

Code:
--- Makefile.orig	Mon Sep  7 23:50:01 2009
+++ Makefile	Mon Sep  7 23:48:26 2009
@@ -20,13 +20,14 @@
 LIB_DEPENDS += SDL::devel/sdl
 WANTLIB += c m pthread stdc++ z
 
+WRKSRC=${WRKDIST}/gambatte_sdl
+
 do-build:
-	@${SETENV} ${MAKE_ENV} ${MODSCONS_BIN} -C ${WRKSRC}/gambatte_sdl \
-	    -C ${WRKSRC}/libgambatte
+	${MODSCONS_BIN} -C ${WRKDIST}/libgambatte
+	${MODSCONS_BIN} -C ${WRKSRC}
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKBUILD}/gambatte_sdl/gambatte_sdl ${PREFIX}/bin/
-	${INSTALL_MAN} ${WRKBUILD}/gambatte_sdl/man/gambatte_sdl.6 \
-	    ${PREFIX}/man/man6/
+	${INSTALL_PROGRAM} ${WRKSRC}/gambatte_sdl ${PREFIX}/bin
+	${INSTALL_MAN} ${WRKSRC}/man/gambatte_sdl.6 ${PREFIX}/man/man6
 
 .include <bsd.port.mk>
Hope that helps.
Reply With Quote
  #7   (View Single Post)  
Old 8th September 2009
backrow backrow is offline
Real Name: Anthony J. Bentley
Shell Scout
 
Join Date: Jul 2009
Location: Albuquerque, NM
Posts: 116
Thanked 10 Times in 4 Posts
Default

Thanks, I really appreciate your help. I’m confused, though—after applying the patch, the manpage still doesn’t get installed. Running the command by hand works:
Code:
# make clean
===>  Cleaning for gambatte-0.4.1
# pkg_delete gambatte
gambatte-0.4.1: complete
# make && make install
===>  Configuring for gambatte-0.4.1
===>  Building for gambatte-0.4.1
/usr/local/bin/scons -C /usr/ports/obj/gambatte-0.4.1/gambatte_src-0.4.1/libgamb
atte                                                                            
scons: Reading SConscript files ...
Checking for C header file zlib.h... yes
Checking for C library z... yes                                                 
scons: done reading SConscript files.
scons: Building targets ...
<snip>
scons: done building targets.
===>  Verifying specs: SDL c m pthread stdc++ z
===>  found SDL.8.0 c.51.0 m.5.1 pthread.11.2 stdc++.49.0 z.4.1
===>  Installing gambatte-0.4.1 from /usr/ports/packages/i386/all/
gambatte-0.4.1: complete
# man gambatte_sdl
man: no entry for gambatte_sdl in the manual.
# which gambatte_sdl
/usr/local/bin/gambatte_sdl
# make show=INSTALL_MAN
install -c -o root -g bin -m 444
# make show=WRKSRC
/usr/ports/obj/gambatte-0.4.1/gambatte_src-0.4.1/gambatte_sdl
# make show=PREFIX
/usr/local
# install -c -o root -g bin -m 444 /usr/ports/obj/gambatte-0.4.1/gambatte_src-0.
4.1/gambatte_sdl/man/gambatte_sdl.6 /usr/local/man/man6
# man gambatte_sdl
man: Formatting manual page...
__________________
Many thanks to the forum regulars who put time and effort into helping others solve their problems.
Reply With Quote
  #8   (View Single Post)  
Old 8th September 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

It works here, a copy of gambatte_sdl.6 is inside of the resulting package.

Code:
# make package
.....
===>  Faking installation for gambatte-0.4.1
install -c -s -o root -g bin -m 555 (SNIP)/gambatte_sdl/gambatte_sdl (SNIP)/fake-i386/usr/local/bin
install -c -o root -g bin -m 444 (SNIP)/man/gambatte_sdl.6 (SNIP)/fake-i386/usr/local/man/man6
===>  Building package for gambatte-0.4.1
Create /usr/ports/packages/i386/all/gambatte-0.4.1.tgz
Link to /usr/ports/packages/i386/ftp/gambatte-0.4.1.tgz
Link to /usr/ports/packages/i386/cdrom/gambatte-0.4.1.tgz
$ tar tvzf /usr/ports/packages/i386/all/gambatte-0.4.1.tgz
-r--r--r--  1 root     wheel          514 Sep  7 23:06 +CONTENTS
-r--r--r--  1 root     wheel          338 Sep  7 23:06 +DESC
-r-xr-xr-x  1 root     bin         330652 Sep  7 23:06 bin/gambatte_sdl
-r--r--r--  1 root     bin           1937 Sep  7 23:06 man/man6/gambatte_sdl.6
$
Do you still have the man page listed in your PLIST file? it's still required.

Last edited by BSDfan666; 8th September 2009 at 03:13 AM.
Reply With Quote
  #9   (View Single Post)  
Old 9th September 2009
backrow backrow is offline
Real Name: Anthony J. Bentley
Shell Scout
 
Join Date: Jul 2009
Location: Albuquerque, NM
Posts: 116
Thanked 10 Times in 4 Posts
Default

Sorry about that. I had neglected to delete the old package tarball.

Posting it to the list in a bit. Thanks again for all the advice!
__________________
Many thanks to the forum regulars who put time and effort into helping others solve their problems.
Reply With Quote
Old 9th September 2009
wilfried's Avatar
wilfried wilfried is offline
Real Name: Peter Strömberg
Port Guard
 
Join Date: May 2008
Location: Teckomatorp, Sweden
Posts: 11
Thanked 3 Times in 3 Posts
Default

Quote:
Originally Posted by backrow View Post
Sorry about that. I had neglected to delete the old package tarball.
And the easiest way to do that is
make clean=package
__________________
HP ProCurve 1800-24G, Phenom 9750, Dual Opteron 265, AMD64 3000+,
Dual P3-800, eMac G4 1.0GHz, Sun Blade 150, Alpha PWS 433 and more ...
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH on port 443 maxrussell General software and network 4 6th April 2009 05:16 AM
Creating 2 slices Beastie FreeBSD Installation and Upgrading 7 23rd March 2009 12:22 AM
Songbird port maxrussell FreeBSD Ports and Packages 1 2nd March 2009 10:47 AM
Command to find and replace, but not creating a new file 18Googol2 Programming 4 22nd September 2008 10:28 PM
Creating a flash player jgroch Programming 0 21st August 2008 05:27 AM


All times are GMT. The time now is 08:52 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick