diff mbox

Add lesstif package

Message ID 523A9EE2.9050701@wanadoo.fr
State Changes Requested
Headers show

Commit Message

Thierry Bultel Sept. 19, 2013, 6:51 a.m. UTC
Signed-off-by: Thierry Bultel <thierry.bultel@wanadoo.fr>
---
Adds support for lesstif.
Quite old thing but useful for porting applications based on xmotif
---

Comments

Peter Korsgaard Sept. 22, 2013, 8:43 a.m. UTC | #1
>>>>> "Thierry" == Thierry Bultel <thierry.bultel@wanadoo.fr> writes:

 Thierry> Signed-off-by: Thierry Bultel <thierry.bultel@wanadoo.fr>
 Thierry> ---
 Thierry> Adds support for lesstif.
 Thierry> Quite old thing but useful for porting applications based on xmotif
 Thierry> ---
 Thierry> diff --git a/package/x11r7/Config.in b/package/x11r7/Config.in
 Thierry> index 205079c..c6d48b3 100644
 Thierry> --- a/package/x11r7/Config.in
 Thierry> +++ b/package/x11r7/Config.in
 Thierry> @@ -12,6 +12,7 @@ if BR2_PACKAGE_XORG7
 Thierry>  		source package/x11r7/xserver_xorg-server/Config.in
 Thierry>  	endmenu
 Thierry>  	menu "X11R7 Libraries"
 Thierry> +		source package/x11r7/lesstif/Config.in
 Thierry>  		source package/x11r7/libxcb/Config.in
 Thierry>  		source package/x11r7/mesa3d/Config.in
 Thierry>  		source package/x11r7/xcb-util/Config.in
 Thierry> diff --git a/package/x11r7/lesstif/Config.in b/package/x11r7/lesstif/Config.in
 Thierry> new file mode 100644
 Thierry> index 0000000..5d7cb11
 Thierry> --- /dev/null
 Thierry> +++ b/package/x11r7/lesstif/Config.in
 Thierry> @@ -0,0 +1,7 @@
 Thierry> +config BR2_PACKAGE_LESSTIF
 Thierry> +        bool "lesstif"
 Thierry> +	select BR2_PACKAGE_XLIB_LIBXP
 Thierry> +        help

You have a mix of spaces and tabs here. The rule for Config.in is to
indent with tab (and help text with tab+space+space).

We don't have a XLIB_LIBXP package in Buildroot?

 Thierry> +          lesstif is the Hungry Programmers' version of OSF/Motif
 Thierry> +
 Thierry> +          http://lesstif.sourceforge.net/
 Thierry> diff --git a/package/x11r7/lesstif/lesstif.mk b/package/x11r7/lesstif/lesstif.mk
 Thierry> new file mode 100644
 Thierry> index 0000000..ed09581
 Thierry> --- /dev/null
 Thierry> +++ b/package/x11r7/lesstif/lesstif.mk
 Thierry> @@ -0,0 +1,39 @@
 Thierry> +
 Thierry> +#############################################################

No empty line before the banner and the #### line should be 80 chars.

 Thierry> +#
 Thierry> +# lesstif
 Thierry> +#
 Thierry> +#############################################################
 Thierry> +LESSTIF_VERSION = 0.95.2
 Thierry> +LESSTIF_SOURCE = lesstif-$(LESSTIF_VERSION).tar.bz2
 Thierry> +LESSTIF_SITE =  http://downloads.sourceforge.net/project/lesstif/lesstif/$(LESSTIF_VERSION)
 Thierry> +LESSTIF_INSTALL_STAGING = YES
 Thierry> +LESSTIF_INSTALL_TARGET = YES

_INSTALL_TARGET defaults to YES, so you can drop that line.

 Thierry> +LESSTIF_DEPENDENCIES = xlib_libXt xlib_libXext

This doesn't match the Config.in. You need to select
BR2_PACKAGE_XLIB_LIBX{T,EXT} in Config.in as well.

 Thierry> +
 Thierry> +LESSTIF_CONF_OPT = \
 Thierry> +	--with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config	\

You don't have freetype in _DEPENDENCIES. Either drop it here if it
isn't used or add it to dependenciees.

 Thierry> +	--with-gnu-ld							\
 Thierry> +	--enable-debug=no						\
 Thierry> +	--enable-production=yes						\
 Thierry> +	--enable-build-tests=no
 Thierry> +
 Thierry> +# Reduces the buggy makefile to the smallest possible (and working) thing
 Thierry> +define LESSTIF_NOMAN2HTML
 Thierry> +	echo "all:" 	> $(@D)/doc/Makefile
 Thierry> +	echo "" 		>> $(@D)/doc/Makefile
 Thierry> +	echo "install:" >> $(@D)/doc/Makefile
 Thierry> +	echo "" 		>> $(@D)/doc/Makefile
 Thierry> +	echo "clean:" 	>> $(@D)/doc/Makefile
 Thierry> +endef
 Thierry> +
 Thierry> +# Remove the ac_find_motif.m4 that is copied on target
 Thierry> +define LESSTIF_FIXACLOCAL
 Thierry> +	rm -rf $(TARGET_DIR)/$(HOME)
 Thierry> +endef

HOME?

 Thierry> +
 Thierry> +LESSTIF_POST_CONFIGURE_HOOKS += LESSTIF_NOMAN2HTML
 Thierry> +LESSTIF_POST_INSTALL_TARGET_HOOKS += LESSTIF_FIXACLOCAL
 Thierry> +
 Thierry> +$(eval $(autotools-package))
 Thierry> +

No empty line after autotools-package.

Care to fix and resend?
Thomas Petazzoni Sept. 22, 2013, 1:41 p.m. UTC | #2
Peter, Thierry,

On Sun, 22 Sep 2013 10:43:29 +0200, Peter Korsgaard wrote:

>  Thierry>  	menu "X11R7 Libraries"
>  Thierry> +		source package/x11r7/lesstif/Config.in

I am also unsure it should be under package/x11r7/. What we normally
keep under package/x11r7/ is really the X.org stack itself, which comes
from the X.org project. As I understand it, Lesstif is more a toolkit
such as Gtk/Qt/EFL, so it should probably be packaged directly in
package/.

Thomas
Thierry Bultel Sept. 23, 2013, 7:36 a.m. UTC | #3
Le 22/09/2013 15:41, Thomas Petazzoni a écrit :
> Peter, Thierry,
>
> On Sun, 22 Sep 2013 10:43:29 +0200, Peter Korsgaard wrote:
>
>>  Thierry>  	menu "X11R7 Libraries"
>>  Thierry> +		source package/x11r7/lesstif/Config.in
> I am also unsure it should be under package/x11r7/. What we normally
> keep under package/x11r7/ is really the X.org stack itself, which comes
> from the X.org project. 
I agree with that.

Shall I put it in the  "Graphics" menu (inserting it with the
alphabetical order)
or in "Graphics  libraries and applications (graphic/text) / graphic
libraries" ?

Thierry
> As I understand it, Lesstif is more a toolkit
> such as Gtk/Qt/EFL, so it should probably be packaged directly in
> package/.
>
> Thomas
Thomas Petazzoni Sept. 23, 2013, 7:49 a.m. UTC | #4
Dear Thierry Bultel,

On Mon, 23 Sep 2013 09:36:56 +0200, Thierry Bultel wrote:

> Shall I put it in the  "Graphics" menu (inserting it with the
> alphabetical order)
> or in "Graphics  libraries and applications (graphic/text) / graphic
> libraries" ?

I believe it should be under 'Libraries' -> 'Graphics'.

Thanks!

Thomas
Thierry Bultel Sept. 23, 2013, 10:47 a.m. UTC | #5
Hi Peter,

thanks for your review :

Le 22/09/2013 10:43, Peter Korsgaard a écrit :
>>>>>> "Thierry" == Thierry Bultel <thierry.bultel@wanadoo.fr> writes:
> 
>  Thierry> Signed-off-by: Thierry Bultel <thierry.bultel@wanadoo.fr>
>  Thierry> ---
>  Thierry> Adds support for lesstif.
>  Thierry> Quite old thing but useful for porting applications based on xmotif
>  Thierry> ---
>  Thierry> diff --git a/package/x11r7/Config.in b/package/x11r7/Config.in
>  Thierry> index 205079c..c6d48b3 100644
>  Thierry> --- a/package/x11r7/Config.in
>  Thierry> +++ b/package/x11r7/Config.in
>  Thierry> @@ -12,6 +12,7 @@ if BR2_PACKAGE_XORG7
>  Thierry>  		source package/x11r7/xserver_xorg-server/Config.in
>  Thierry>  	endmenu
>  Thierry>  	menu "X11R7 Libraries"
>  Thierry> +		source package/x11r7/lesstif/Config.in
>  Thierry>  		source package/x11r7/libxcb/Config.in
>  Thierry>  		source package/x11r7/mesa3d/Config.in
>  Thierry>  		source package/x11r7/xcb-util/Config.in
>  Thierry> diff --git a/package/x11r7/lesstif/Config.in b/package/x11r7/lesstif/Config.in
>  Thierry> new file mode 100644
>  Thierry> index 0000000..5d7cb11
>  Thierry> --- /dev/null
>  Thierry> +++ b/package/x11r7/lesstif/Config.in
>  Thierry> @@ -0,0 +1,7 @@
>  Thierry> +config BR2_PACKAGE_LESSTIF
>  Thierry> +        bool "lesstif"
>  Thierry> +	select BR2_PACKAGE_XLIB_LIBXP
>  Thierry> +        help
> 
> You have a mix of spaces and tabs here. The rule for Config.in is to
> indent with tab (and help text with tab+space+space).
> 
> We don't have a XLIB_LIBXP package in Buildroot?

ack
This is a mistake.
Taking your notes below in account, this should be

    select BR2_PACKAGE_XLIB_LIBXT
    select BR2_PACKAGE_XLIB_LIBXEXT

I wonder if I should not add "depends on BR2_PACKAGE_XORG7" as well ?
Else the needed libraries will not be built at all.


> 
>  Thierry> +          lesstif is the Hungry Programmers' version of OSF/Motif
>  Thierry> +
>  Thierry> +          http://lesstif.sourceforge.net/
>  Thierry> diff --git a/package/x11r7/lesstif/lesstif.mk b/package/x11r7/lesstif/lesstif.mk
>  Thierry> new file mode 100644
>  Thierry> index 0000000..ed09581
>  Thierry> --- /dev/null
>  Thierry> +++ b/package/x11r7/lesstif/lesstif.mk
>  Thierry> @@ -0,0 +1,39 @@
>  Thierry> +
>  Thierry> +#############################################################
> 
> No empty line before the banner and the #### line should be 80 chars.
> 
>  Thierry> +#
>  Thierry> +# lesstif
>  Thierry> +#
>  Thierry> +#############################################################
>  Thierry> +LESSTIF_VERSION = 0.95.2
>  Thierry> +LESSTIF_SOURCE = lesstif-$(LESSTIF_VERSION).tar.bz2
>  Thierry> +LESSTIF_SITE =  http://downloads.sourceforge.net/project/lesstif/lesstif/$(LESSTIF_VERSION)
>  Thierry> +LESSTIF_INSTALL_STAGING = YES
>  Thierry> +LESSTIF_INSTALL_TARGET = YES
> 
> _INSTALL_TARGET defaults to YES, so you can drop that line.
> 
>  Thierry> +LESSTIF_DEPENDENCIES = xlib_libXt xlib_libXext
> 
> This doesn't match the Config.in. You need to select
> BR2_PACKAGE_XLIB_LIBX{T,EXT} in Config.in as well.
> 
>  Thierry> +
>  Thierry> +LESSTIF_CONF_OPT = \
>  Thierry> +	--with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config	\

you're right.
lesstif definitively needs freetype.
Adding it to deps.

> 
> You don't have freetype in _DEPENDENCIES. Either drop it here if it
> isn't used or add it to dependenciees.
> 
>  Thierry> +	--with-gnu-ld							\
>  Thierry> +	--enable-debug=no						\
>  Thierry> +	--enable-production=yes						\
>  Thierry> +	--enable-build-tests=no
>  Thierry> +
>  Thierry> +# Reduces the buggy makefile to the smallest possible (and working) thing
>  Thierry> +define LESSTIF_NOMAN2HTML
>  Thierry> +	echo "all:" 	> $(@D)/doc/Makefile
>  Thierry> +	echo "" 		>> $(@D)/doc/Makefile
>  Thierry> +	echo "install:" >> $(@D)/doc/Makefile
>  Thierry> +	echo "" 		>> $(@D)/doc/Makefile
>  Thierry> +	echo "clean:" 	>> $(@D)/doc/Makefile
>  Thierry> +endef
>  Thierry> +
>  Thierry> +# Remove the ac_find_motif.m4 that is copied on target
>  Thierry> +define LESSTIF_FIXACLOCAL
>  Thierry> +	rm -rf $(TARGET_DIR)/$(HOME)
>  Thierry> +endef
> 
> HOME?

yes, current user $(HOME).
This is weird indeed but lesstif actually creates

$(TARGET_DIR)/$(HOME)/$(TOPDIR)/output/host/usr/share/aclocal/ac_find_motif.m4


> 
>  Thierry> +
>  Thierry> +LESSTIF_POST_CONFIGURE_HOOKS += LESSTIF_NOMAN2HTML
>  Thierry> +LESSTIF_POST_INSTALL_TARGET_HOOKS += LESSTIF_FIXACLOCAL
>  Thierry> +
>  Thierry> +$(eval $(autotools-package))
>  Thierry> +
> 
> No empty line after autotools-package.
> 
> Care to fix and resend?
> 

Sure, once we are ok with the all points above

Regards
Thierry
Peter Korsgaard Sept. 23, 2013, 10:50 a.m. UTC | #6
>>>>> "Thierry" == Thierry Bultel <thierry.bultel@wanadoo.fr> writes:

Hi,

 >> We don't have a XLIB_LIBXP package in Buildroot?

 Thierry> ack
 Thierry> This is a mistake.
 Thierry> Taking your notes below in account, this should be

 Thierry>     select BR2_PACKAGE_XLIB_LIBXT
 Thierry>     select BR2_PACKAGE_XLIB_LIBXEXT

 Thierry> I wonder if I should not add "depends on BR2_PACKAGE_XORG7" as well ?
 Thierry> Else the needed libraries will not be built at all.

Indeed. Look at the blackbox package for an example


 Thierry> +# Remove the ac_find_motif.m4 that is copied on target
 Thierry> +define LESSTIF_FIXACLOCAL
 Thierry> +	rm -rf $(TARGET_DIR)/$(HOME)
 Thierry> +endef
 >> 
 >> HOME?

 Thierry> yes, current user $(HOME).
 Thierry> This is weird indeed but lesstif actually creates

 Thierry> $(TARGET_DIR)/$(HOME)/$(TOPDIR)/output/host/usr/share/aclocal/ac_find_motif.m4

Ahh. Could you extend the comment a bit to explain this?


 >> Care to fix and resend?

 Thierry> Sure, once we are ok with the all points above

Great, thanks.
Thomas Petazzoni Sept. 23, 2013, 12:12 p.m. UTC | #7
Dear Thierry Bultel,

On Mon, 23 Sep 2013 12:47:36 +0200, Thierry Bultel wrote:

> >  Thierry> +# Remove the ac_find_motif.m4 that is copied on target
> >  Thierry> +define LESSTIF_FIXACLOCAL
> >  Thierry> +	rm -rf $(TARGET_DIR)/$(HOME)
> >  Thierry> +endef
> > 
> > HOME?
> 
> yes, current user $(HOME).
> This is weird indeed but lesstif actually creates

For those users who run Buildroot as root, this is going to remove
$(TARGET_DIR)/root from the root filesystem, which isn't nice. Also if
the user running Buildroot is foo and a 'foo' user has been created for
the target filesystem, it will remove its home directory.

Therefore, either the package should be patched not to install things
in such an odd location, or the removal should be made a bit more
specific. Remember to also test the case where Buildroot is built
out-of-tree using O=, since those files will then most likely not be
installed in $(TARGET_DIR)/$(HOME)/$(TOPDIR)/output.

Best regards,

Thomas
diff mbox

Patch

diff --git a/package/x11r7/Config.in b/package/x11r7/Config.in
index 205079c..c6d48b3 100644
--- a/package/x11r7/Config.in
+++ b/package/x11r7/Config.in
@@ -12,6 +12,7 @@  if BR2_PACKAGE_XORG7
  		source package/x11r7/xserver_xorg-server/Config.in
  	endmenu
  	menu "X11R7 Libraries"
+		source package/x11r7/lesstif/Config.in
  		source package/x11r7/libxcb/Config.in
  		source package/x11r7/mesa3d/Config.in
  		source package/x11r7/xcb-util/Config.in
diff --git a/package/x11r7/lesstif/Config.in b/package/x11r7/lesstif/Config.in
new file mode 100644
index 0000000..5d7cb11
--- /dev/null
+++ b/package/x11r7/lesstif/Config.in
@@ -0,0 +1,7 @@ 
+config BR2_PACKAGE_LESSTIF
+        bool "lesstif"
+	select BR2_PACKAGE_XLIB_LIBXP
+        help
+          lesstif is the Hungry Programmers' version of OSF/Motif
+
+          http://lesstif.sourceforge.net/
diff --git a/package/x11r7/lesstif/lesstif.mk b/package/x11r7/lesstif/lesstif.mk
new file mode 100644
index 0000000..ed09581
--- /dev/null
+++ b/package/x11r7/lesstif/lesstif.mk
@@ -0,0 +1,39 @@ 
+
+#############################################################
+#
+# lesstif
+#
+#############################################################
+LESSTIF_VERSION = 0.95.2
+LESSTIF_SOURCE = lesstif-$(LESSTIF_VERSION).tar.bz2
+LESSTIF_SITE =  http://downloads.sourceforge.net/project/lesstif/lesstif/$(LESSTIF_VERSION)
+LESSTIF_INSTALL_STAGING = YES
+LESSTIF_INSTALL_TARGET = YES
+LESSTIF_DEPENDENCIES = xlib_libXt xlib_libXext
+
+LESSTIF_CONF_OPT = \
+	--with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config	\
+	--with-gnu-ld							\
+	--enable-debug=no						\
+	--enable-production=yes						\
+	--enable-build-tests=no
+
+# Reduces the buggy makefile to the smallest possible (and working) thing
+define LESSTIF_NOMAN2HTML
+	echo "all:" 	> $(@D)/doc/Makefile
+	echo "" 		>> $(@D)/doc/Makefile
+	echo "install:" >> $(@D)/doc/Makefile
+	echo "" 		>> $(@D)/doc/Makefile
+	echo "clean:" 	>> $(@D)/doc/Makefile
+endef
+
+# Remove the ac_find_motif.m4 that is copied on target
+define LESSTIF_FIXACLOCAL
+	rm -rf $(TARGET_DIR)/$(HOME)
+endef
+
+LESSTIF_POST_CONFIGURE_HOOKS += LESSTIF_NOMAN2HTML
+LESSTIF_POST_INSTALL_TARGET_HOOKS += LESSTIF_FIXACLOCAL
+
+$(eval $(autotools-package))
+