Solved First port - autogen.sh and autotools

I've already read the thread about the autogen.sh: "read what is inside an do it the port way"

I'm trying to do so:
Code:
GNU_CONFIGURE=      yes
CONFIGURE_ARGS=     --enable-sdl2
USE_AUTOTOOLS=      aclocal autoheader automake autoconf
AUTOMAKE_ARGS=      --include-deps --add-missing --copy
WANT_SDL=           yes

but all I get is env: ./configure: No such file or directory and no autotool is called at all. Should I try to call autogen.sh on my own somehow?

(trying to create a port for dosbox-x currently)
 
Great, thanks. Result now
Code:
USES=               autoreconf
GNU_CONFIGURE=      yes
CONFIGURE_ARGS=     --enable-sdl2 --prefix=${WRKDIR}/dist
USE_AUTOTOOLS=      aclocal autoheader automake autoconf
AUTOMAKE_ARGS=      --include-deps --add-missing --copy
USE_SDL=            sdl2
[code]
I hope the redirection of the prefix works for the pkg-plist, but my laptop is too slow to try it today :)
 
When you USE_SDL, you should remove the --enable-sdl2 from the CONFIGURE_ARGS.
Another thing, you shouldn't point a prefix like that, the port system usually know where the things goes. After you build successful with make, you can check the work/stage directory to see if everything is fine.

To mention, I'm interested in dosbox-x.
 
It may need USES=autoreconf sdl.

USE_SDL= is different than SDL_USES= as I'm now distinguishing the differences. SDL_USES= and SDL_USE= only pull in what's after the equal sign, if the SDL option is chosen before this statement. It's shorthand for a conditional statement. It looks like USES+= is for when there's a dependency that's added to an already written USES= for the core dependencies. This is replaced by the shorthand way.

For arguments that are solid dependencies and aren't optional, USES_ and USES_ are enough for many hardwired dependency purposes. For options that are more complicated and more specific to /usr/ports/Mk/Uses/, full if-then statements in the Makefile can't go wrong.

Detail about USE_[option]=

5.13.3.2. OPT_USE and OPT_USE_OFF​

When option OPT is selected, for each key=value pair in OPT_USE, value is appended to the corresponding USE_KEY. If value has spaces in it, replace them with commas and they will be changed back to spaces during processing. OPT_USE_OFF works the same way, but when OPT is not selected. For example:
OPTIONS_DEFINE= OPT1
OPT1_USES= xorg
OPT1_USE= mysql=yes xorg=x11,xextproto,xext,xrandr
OPT1_USE_OFF= openssl=yes
is equivalent to:
OPTIONS_DEFINE= OPT1

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MOPT1}
USE_MYSQL= yes
USES+= xorg
USE_XORG= x11 xextproto xext xrandr
.else
USE_OPENSSL= yes
.endif
I wrote this too soon, and I'm still studying the details.
 
It's learning, either way. Using the other Makefile may have something to learn from, which can be investigated by searching about that. The Porters Handbook may give more explanation on the arguments that are in that Makefile.

Using examples from similar Makefiles along with searching the Porters Handbook, may help you find what's needed faster or with less impediments.

It has SDL arguments, which may help or be a starting point. It can be compared to the work you've done, then it will help you figure out what's needed or what isn't.

emulators/dosbox snippet:
Code:
USES=           cpe sdl
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --enable-core-inline
USE_SDL=        sdl net sound

The results of your original Makefile and the customization of the other Makefile can be compared as well.
 
Back
Top