Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
JuffEd - QT text editor
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
genmich
Apprentice
Apprentice


Joined: 03 Apr 2003
Posts: 196

PostPosted: Wed Nov 07, 2007 1:59 pm    Post subject: JuffEd - QT text editor Reply with quote

Was searching for a good light text editor (don't want to start the 'best text editor' flame war) and found this one:

JuffEd: http://sourceforge.net/projects/juffed/
http://sourceforge.net/project/screenshots.php?group_id=205470

quick, small, tabs, highlighting (just c++)

Try it! I had to change qmake-qt4 to qmake in the Makefile to compile it, then it worked fine.
Back to top
View user's profile Send private message
genmich
Apprentice
Apprentice


Joined: 03 Apr 2003
Posts: 196

PostPosted: Tue Nov 20, 2007 9:10 pm    Post subject: Reply with quote

New beta is out. I've tried to make an ebuild but it stops during install with
Quote:
install -d /usr/share/juffed
ACCESS DENIED mkdir: /usr/share/juffed
install: cannot change permissions of `/usr/share/juffed': No such file or directory


Why can't it create a folder?


Here is the not-working ebuild:

juffed-0.1.2_beta3.ebuild
Code:
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

DESCRIPTION="JuffEd - Simple tabbed text editor with syntax highlighting"
HOMEPAGE="http://sourceforge.net/projects/juffed/"
SRC_URI="mirror://sourceforge/juffed/juffed_0.1.2-beta3.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~mips ~sparc ~x86"
IUSE=""

DEPEND="qt? ( =>x11-libs/qt-4* )"


src_compile() {
    cd juffed_0.1.2-beta3
    emake || die "emake failed"
}

src_install() {
    cd juffed_0.1.2-beta3
    emake DESTDIR="${D}" install || die "install failed"
}


Perhaps someone can check it and correct it.
Back to top
View user's profile Send private message
genmich
Apprentice
Apprentice


Joined: 03 Apr 2003
Posts: 196

PostPosted: Tue Nov 27, 2007 11:36 am    Post subject: Reply with quote

Sorry, still no success in the install. Can someone help me with this?
Back to top
View user's profile Send private message
genmich
Apprentice
Apprentice


Joined: 03 Apr 2003
Posts: 196

PostPosted: Thu Jan 17, 2008 11:52 am    Post subject: Reply with quote

New version is out: http://sourceforge.net/project/showfiles.php?group_id=205470&package_id=259429

Quote:
* Added options "Show line numbers" and "Adjust by width" for each document separately;
* Added session name and file name in window title;
* Added toolbar icons size changing;
* Improved response when search reaches the end or the beginning of the document;
* Added closing documents with middle-click on the corresponding tab;
* Added "Recent files" menu;
* "Save as" dialog now contains the original file name;
* Added making a backup copy when saving the file;
* Added file reload action;
Back to top
View user's profile Send private message
desultory
Administrator
Administrator


Joined: 04 Nov 2005
Posts: 9068

PostPosted: Fri Jan 18, 2008 8:01 am    Post subject: Reply with quote

miga wrote:
I've tried to make an ebuild but it stops during install with
Quote:
install -d /usr/share/juffed
ACCESS DENIED mkdir: /usr/share/juffed
install: cannot change permissions of `/usr/share/juffed': No such file or directory


Why can't it create a folder?
Because it is attempting to alter the host system before the package is installed into it, instead it should be creating a directory under $D.
miga wrote:
Code:
src_install() {
    cd juffed_0.1.2-beta3
    emake DESTDIR="${D}" install || die "install failed"
}


Perhaps someone can check it and correct it.
The Makefile does not use DESTDIR, instead it uses PREFIX to determine where to install the package, though it is not consistent in its use. Even if 'emake DESTDIR="${D}" install' is replaced with 'emake PREFIX="${D}/usr" install', the Makefile will still need to be patched for the package to successfully install while sandbox is in use. It might be worth trying einstall instead of using emake there.
Back to top
View user's profile Send private message
genmich
Apprentice
Apprentice


Joined: 03 Apr 2003
Posts: 196

PostPosted: Fri Jan 18, 2008 10:46 am    Post subject: Reply with quote

Thanks. I tried it again for the latest version:

juffed-0.2_beta1.ebuild
Code:

# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

DESCRIPTION="JuffEd - Simple tabbed text editor with syntax highlighting"
HOMEPAGE="http://sourceforge.net/projects/juffed/"
SRC_URI="mirror://sourceforge/juffed/juffed_0.2-dev-20080116.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~mips ~sparc ~x86"
IUSE=""

DEPEND="qt? ( =>x11-libs/qt-4* )"

src_compile() {
    cd juffed_0.2-dev-20080116
    emake || die "emake failed"
}

src_install() {
    cd juffed_0.2-dev-20080116
    emake DATA_PATH="${D}" install || die "install failed"
}


(the author changed the makefile for that if you only saw the old version)
There is still a sandbox error but this time it's when creating the symlinks during install. So only two lines left to get it to run!
Quote:
cd /usr/bin && ln -sf ../share/juffed/juffed ./juffed
ACCESS DENIED symlink: /usr/bin/juffed
ln: creating symbolic link `./juffed': Permission denied
make: *** [install] Error 1


And this is the Makefile btw, if someone wants to help but don't want to download it
Code:
PREFIX=/usr

DATA_PATH=$(PREFIX)/share/juffed

QMAKE=qmake
MAKE=make
LRELEASE=lrelease

src/juffed:
   cd src && $(QMAKE) && $(MAKE)
   cd src && $(LRELEASE) juffed.pro
   strip juffed

distclean:
   rm juffed
   rm l10n/juffed_*.qm
   cd src && make clean
   rm src/Makefile

clean:
   cd src && make clean
   rm src/Makefile

install:
   install -d $(DATA_PATH)
   install -m 755 juffed $(DATA_PATH)
   install -m 644 juffed.conf $(DATA_PATH)
   install -d $(DATA_PATH)/l10n
   install -d $(DATA_PATH)/icons
   install -d $(DATA_PATH)/hlschemes
   install l10n/*.qm $(DATA_PATH)/l10n/
   install hlschemes/* $(DATA_PATH)/hlschemes/
   cp -R icons/* $(DATA_PATH)/icons/
   cd $(PREFIX)/bin && ln -sf ../share/juffed/juffed ./juffed
   install juffed.png $(PREFIX)/share/pixmaps/
   install juffed.desktop $(PREFIX)/share/applications/

uninstall:
   rm $(DATA_PATH)/juffed
   rm $(DATA_PATH)/juffed.conf
   rm $(DATA_PATH)/l10n/*.qm
   rm -rf $(DATA_PATH)/icons
   rm -rf $(DATA_PATH)/hlschemes
   rm -rf $(DATA_PATH)/l10n
   rmdir $(DATA_PATH)
   rm $(PREFIX)/bin/juffed
   rm $(PREFIX)/share/pixmaps/juffed.png
   rm $(PREFIX)/share/applications/juffed.desktop
Back to top
View user's profile Send private message
desultory
Administrator
Administrator


Joined: 04 Nov 2005
Posts: 9068

PostPosted: Sat Jan 19, 2008 10:49 am    Post subject: Reply with quote

miga wrote:
Code:
src_install() {
    cd juffed_0.2-dev-20080116
    emake DATA_PATH="${D}" install || die "install failed"
}
Use PREFIX="${D}/usr" in place of DATA_PATH="${D}", even if the latter would avoid the sandbox violations, it would install the package to an improper location.
miga wrote:
(the author changed the makefile for that if you only saw the old version)
I only checked the version for which you had posted an ebuild, other versions were not relevant. The newer revision has improved the consistency of path settings in the Makefile to the point where it should not need to be patched to install the package properly.

Note that the use of qmake to build the package necessitates a dependency upon a package providing a compatible version.
Back to top
View user's profile Send private message
genmich
Apprentice
Apprentice


Joined: 03 Apr 2003
Posts: 196

PostPosted: Sat Jan 19, 2008 4:08 pm    Post subject: Reply with quote

desultory wrote:
I only checked the version for which you had posted an ebuild, other versions were not relevant. The newer revision has improved the consistency of path settings in the Makefile to the point where it should not need to be patched to install the package properly.


Ok. I still had no luck. Hopefully someone can help me to fix it.

desultory wrote:
Note that the use of qmake to build the package necessitates a dependency upon a package providing a compatible version.


I thought that would be included with DEPEND="qt? ( =>x11-libs/qt-4* )" because it needs qt4 to be compiled (I'm using QT 4.3.2 with QMake 2.01a)
Back to top
View user's profile Send private message
desultory
Administrator
Administrator


Joined: 04 Nov 2005
Posts: 9068

PostPosted: Sun Jan 20, 2008 9:54 am    Post subject: Reply with quote

miga wrote:
Ok. I still had no luck. Hopefully someone can help me to fix it.
Perhaps posting a current revision could clarify quite what the problem is.
miga wrote:
I thought that would be included with DEPEND="qt? ( =>x11-libs/qt-4* )" because it needs qt4 to be compiled (I'm using QT 4.3.2 with QMake 2.01a)
That dependency is conditional, the use of qmake in the build process is not.
Back to top
View user's profile Send private message
Ken69267
Developer
Developer


Joined: 08 Apr 2007
Posts: 111
Location: #gentoo-pr0n

PostPosted: Mon Jan 21, 2008 3:53 am    Post subject: Reply with quote

well this was fun... gah

juffed-0.2_beta20080116.ebuild

Code:

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils qt4

MY_P=${PN}_${PV/_beta/-dev-}

DESCRIPTION="Tabbed text editor with syntax highlighting"
HOMEPAGE="http://sourceforge.net/projects/juffed"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""

RDEPEND="$(qt4_min_version 4.0)"
DEPEND="${RDEPEND}"

S="${WORKDIR}"/${MY_P}

src_unpack() {
   unpack ${A}
   cd "${S}"
   epatch "${FILESDIR}"/${P}-desktop-entry.patch
   sed -i -e 's:cd $(PREFIX)/bin && ln -sf ../share/juffed/juffed ./juffed::' \
      Makefile || die "sed failed"
   sed -i -e 's:install juffed.png $(PREFIX)/share/pixmaps/::' \
      Makefile || die "sed failed"
   sed -i -e 's:install juffed.desktop $(PREFIX)/share/applications/::' \
      Makefile || die "sed failed"
   sed -i -e 's:strip juffed::' Makefile || die "sed failed"
}

src_compile() {
   emake
}

src_install() {
   emake PREFIX="${D}/usr" install || die "emake install failed"
   dosym /usr/share/${PN}/${PN} /usr/bin/${PN}
   doicon ${PN}.png
   insinto /usr/share/applications
   doins ${PN}.desktop
   dodoc ChangeLog
}



files/juffed-0.2_beta20080116-desktop-entry.patch (does not validate without patch)

Code:

--- juffed.desktop.orig   2008-01-20 21:17:05.000000000 -0500
+++ juffed.desktop   2008-01-20 21:17:38.000000000 -0500
@@ -1,15 +1,14 @@
 [Desktop Entry]
-Categories=Application;TextEditor;Qt
+Categories=TextEditor;Qt;
 Comment=Simple text editor
 Comment[ru]=Простой текстовый редактор
 Comment[pl]=Prosty edytor tekstu
-Encoding=UTF-8
 Exec=juffed
 GenericName=Simple text editor
 GenericName[ru]=Простой текстовый редактор
 GenericName[pl]=Prosty edytor tekstu
 Icon=juffed
-MimeType=text/plain
+MimeType=text/plain;
 Name=JuffEd
 Name[ru]=JuffEd
 Name[pl]=JuffEd


edit: Removed versionator, cleaner MY_P. ugh, there's a QA notice too... fixing that too by sedding strip out of the makefile...
_________________
!snack


Last edited by Ken69267 on Mon Jan 21, 2008 2:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
genmich
Apprentice
Apprentice


Joined: 03 Apr 2003
Posts: 196

PostPosted: Mon Jan 21, 2008 11:05 am    Post subject: Reply with quote

Thank you, Ken69267!
I will forward the desktop-patches to the developer so he can include it in the next release!
Back to top
View user's profile Send private message
Ken69267
Developer
Developer


Joined: 08 Apr 2007
Posts: 111
Location: #gentoo-pr0n

PostPosted: Mon Jan 21, 2008 3:00 pm    Post subject: Reply with quote

I edited the ebuild above a bit, cleaner way of getting MY_P. I also fixed a QA notice as the Makefile was pre-stripping the program.
_________________
!snack
Back to top
View user's profile Send private message
genmich
Apprentice
Apprentice


Joined: 03 Apr 2003
Posts: 196

PostPosted: Tue Mar 11, 2008 9:47 am    Post subject: Reply with quote

added it to bugzilla and updated the ebuild to the next version. patch not needed anymore: https://bugs.gentoo.org/show_bug.cgi?id=212693
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum