Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 455956 - app-editors/wxhexeditor-0.21 version bump
Summary: app-editors/wxhexeditor-0.21 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo wxWidgets Herd
URL: http://sourceforge.net/projects/wxhex...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-02-07 02:59 UTC by Dave Armstrong
Modified: 2013-03-16 20:37 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
wxhexeditor-0.21-makefile.patch (wxhexeditor-0.21-makefile.patch,4.64 KB, patch)
2013-02-07 02:59 UTC, Dave Armstrong
Details | Diff
wxhexeditor-0.21.ebuild (wxhexeditor-0.21.ebuild,1.10 KB, text/plain)
2013-02-07 03:00 UTC, Dave Armstrong
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Armstrong 2013-02-07 02:59:43 UTC
Created attachment 338184 [details, diff]
wxhexeditor-0.21-makefile.patch

The attached ebuild and patch are based on version .20.  They need review from an experienced packager/ebuilder.
Comment 1 Dave Armstrong 2013-02-07 03:00:56 UTC
Created attachment 338186 [details]
wxhexeditor-0.21.ebuild
Comment 2 Jeroen Roovers gentoo-dev 2013-02-07 03:06:02 UTC
Comment on attachment 338186 [details]
wxhexeditor-0.21.ebuild

--- wxhexeditor-0.20.ebuild     2012-07-02 05:47:52.000000000 +0200
+++ -   2013-02-07 04:02:47.809744135 +0100
@@ -32,4 +32,17 @@
 
 src_prepare() {
        epatch "${FILESDIR}"/${P}-makefile.patch
+
+    for x in ./src/HexEditorGui.cpp ./src/HexEditorGui.h ./src/HexEditorCtrl/HexEditorCtrlGui.cpp \
+       ./src/HexEditorCtrl/HexEditorCtrlGui.h
+    do
+       sed -i 's/wxT(/_(/g' $x
+       sed -i "s/_('\\\t')/wxT('\\\t')/g" $x
+    done
+

sed is quite capable of processing multiple file arguments, so
     sed -i {your files} -e {your sed scripts}
should work just as good, and also quite a bit faster as every file gets opened just once and sed gets called just once too.

+}
+src_install(){
+
+emake DESTDIR="${D}" install
+
 }

This is the default, so it should not be in the ebuild.
Comment 3 Dave Armstrong 2013-02-07 11:28:22 UTC
(In reply to comment #2)
> Comment on attachment 338186 [details]
> wxhexeditor-0.21.ebuild
> 
> --- wxhexeditor-0.20.ebuild     2012-07-02 05:47:52.000000000 +0200
> +++ -   2013-02-07 04:02:47.809744135 +0100
> @@ -32,4 +32,17 @@
>  
>  src_prepare() {
>         epatch "${FILESDIR}"/${P}-makefile.patch
> +
> +    for x in ./src/HexEditorGui.cpp ./src/HexEditorGui.h
> ./src/HexEditorCtrl/HexEditorCtrlGui.cpp \
> +       ./src/HexEditorCtrl/HexEditorCtrlGui.h
> +    do
> +       sed -i 's/wxT(/_(/g' $x
> +       sed -i "s/_('\\\t')/wxT('\\\t')/g" $x
> +    done
> +
> 
> sed is quite capable of processing multiple file arguments, so
>      sed -i {your files} -e {your sed scripts}
> should work just as good, and also quite a bit faster as every file gets
> opened just once and sed gets called just once too.

I know. It's actually just a cut 'n paste from the shell script 'GUILocaleFix.sh' (found in the root directory of the tarball).  Upon further inspection, it doesn't actually do anything at all because the source files have apparently already been preprocessed, so the sed part can be dropped entirely.

For future reference, I'd assume it'd be 'best practice' (if not cleaner) to invoke the shell script (GUILocaleFix.sh in this case) from within src_prepare() instead of embedding the sed commands in the ebuild.  Please let me know if I'm mistaken.

FYI, the build now installs a Turkish locale (the only non-English translation available at this time) by default...

> +}
> +src_install(){
> +
> +emake DESTDIR="${D}" install
> +
>  }
> 
> This is the default, so it should not be in the ebuild.

Right.  Sorry, it's a 'leftover' from a test.  I did warn it needed a cleanup! ;-)

Thanks!