LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-21-2007, 03:09 AM   #1
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Rep: Reputation: 50
Slack 11.0 patch source code freetype-2.3.4


Hi,

From the latest patches, from the source folder, I downloaded the folder named freetype.

Running the freetype.SlackBuild works fine. It compiles, builds a package.

But it will not make a package if I enable the byte code interpreter line inside freetype.SlackBuild

It reports "hunk" and some other errors, there is no compiling and no package is made.

freetype 2.1.9 did not have this problem. (2.1.9 worked ok with the bytecode interpreter line enabled)

Can someone explain to me what to do so I can make/get my own freetype-2.3.4 Slack 11.0 package with the byte code interpreter enabled?

--
Alan.
 
Old 04-21-2007, 04:45 AM   #2
J_W
Member
 
Registered: Apr 2004
Location: Yamagata, JAPAN
Distribution: Slackware64-current
Posts: 189

Rep: Reputation: 123Reputation: 123
Hi

I made a diff below. Hope this work.

--- CUT ---
diff -Nru freetype-2.3.4.orig/include/freetype/config/ftoption.h freetype-2.3.4.new/include/freetype/config/ftoption.h
--- freetype-2.3.4.orig/include/freetype/config/ftoption.h 2007-04-21 17:49:37.000000000 +0900
+++ freetype-2.3.4.new/include/freetype/config/ftoption.h 2007-04-21 17:52:16.000000000 +0900
@@ -456,7 +456,7 @@
/* Do not #undef this macro here, since the build system might */
/* define it for certain configurations only. */
/* */
-/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER


/*************************************************************************/
--- CUT ---
 
Old 04-21-2007, 05:34 AM   #3
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,784

Rep: Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460
Here is another variant. Get it here:
Code:
wget http://alpha.cc.tut.fi/~kaukasoi/freetype.bytecode.interpreter.diff.gz
Or from here:
Code:
diff -Naur freetype-2.3.4.orig/include/freetype/config/ftoption.h freetype-2.3.4/include/freetype/config/ftoption.h
--- freetype-2.3.4.orig/include/freetype/config/ftoption.h      2007-01-05 18:18:45.000000000 +0200
+++ freetype-2.3.4/include/freetype/config/ftoption.h   2007-04-21 13:28:46.000000000 +0300
@@ -92,7 +92,7 @@
   /* This is done to allow FreeType clients to run unmodified, forcing     */
   /* them to display normal gray-level anti-aliased glyphs.                */
   /*                                                                       */
-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
 
 
   /*************************************************************************/
@@ -456,7 +456,7 @@
   /*   Do not #undef this macro here, since the build system might         */
   /*   define it for certain configurations only.                          */
   /*                                                                       */
-/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
 
 
   /*************************************************************************/
@@ -468,7 +468,7 @@
   /* FT_PARAM_TAG_UNPATENTED_HINTING; or when the debug hook               */
   /* FT_DEBUG_HOOK_UNPATENTED_HINTING is globally activated.               */
   /*                                                                       */
-#define TT_CONFIG_OPTION_UNPATENTED_HINTING
+/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */
 
 
   /*************************************************************************/
 
Old 04-21-2007, 07:47 AM   #4
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Ah, I had not read the comments too closely that you find right above
Code:
#define TT_CONFIG_OPTION_UNPATENTED_HINTING
... so if you leave that enabled while also enabling
Code:
#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
, it looks as if the patented algorithms still are not compiled in?
I.e. Petri Kaukasoina's patch with #define TT_CONFIG_OPTION_UNPATENTED_HINTING commented out is the one that should work?

Eric
 
Old 04-21-2007, 08:55 AM   #5
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,784

Rep: Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460
I think so because of this mail:

http://lists.gnu.org/archive/html/fr.../msg00064.html

(David Turner is a freetype developer).
 
Old 04-21-2007, 06:27 PM   #6
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Original Poster
Rep: Reputation: 50
Quote:
Here is another variant. Get it here:
Code:

wget
Hi. Due to business elsewhere, I just now checked in and, at this time, there's 4 replies plus my original, which equals 5 posts. And this post right here now makes a total of 6 posts so far.

(per above quote) I just wget'ed the diff.gz file.
--

al@p3srv:/mnt/sata/install/freetype234$ ls
freetype-2.3.4.tar.bz2
freetype-2.3.4.tar.bz2.sig
freetype.SlackBuild*
freetype.build*
freetype.bytecode.interpreter.diff.gz
freetype.bytecode.interpreter_slack_orig.diff.gz
freetype.illadvisederror.diff.gz
freetype_ac.SlackBuild*
slack-desc

There, you can see the (and also my customized contents) contents of the patches/source/freetype folder (I later renamed the folder to freetype234).

Before I wget'ed the mentioned diff.gz file, I (as it's seen above) renamed the original to "freetype.bytecode.interpreter_slack_orig.diff.gz"

Then I merely wget'ed the replacement into this folder.

I then (as it's seen above) made a copy of freetype.SlackBuild named freetype_ac.SlackBuild

I then edited and saved the change on that latter file, did enabled the bytecode interpreter line.

Next, I ran ./freetype_ac.SlackBuild

And it compiled, built a package.

I then renamed that package from: freetype-2.3.4-i486-1_slack11.0.tgz to freetype-2.3.4-i486-1_ac.tgz

# removepkg freetype-2.1.9-i486-1_ac.tgz

# installpkg freetype-2.3.4-i486-1_ac.tgz

I then logged out of KDE which reverts me back to run level 3 and into the first or logon terminal.

al@p3srv:~$ startx

The fonts are now better yet than they ever were before (they were pretty darn good with freetype 2.1.9).
--

Linux fonts have been so good for a while now that it may now be a mute point to 1. add in msttf (ms true type fonts) and to 2. do this bytecode interpreter enabling thing.

But I'm not touching my fonts (since they're working so good at this time) as in "if it ain't broke, don't fix it."
--

As a guess, I'd guess that instead of my wget'ing that diff.gz file, I, instead, could have copied the contents as shared (next to the wget url) and then pasted that into an editor and then save it as a file named: freetype.bytecode.interpreter.diff

And then gzip that file so as to end up with: freetype.bytecode.interpreter.diff.gz

Another guess: I guess that's called a patch? Can someone confirm?

Lastly, can anyone share a good www site on the (very) basics or getting started learning of patch?

I guess (in a nutshell) a patch applies a diff to a former (or a pre existing) file during the compiling. Thus, this is a way of "on the fly" (or dynamically so to speak) obtaining an updated or altered outcome during the compiling. (am I correct here, on what I said in this paragraph?).

Thanks.

--
Alan.
 
Old 04-21-2007, 06:38 PM   #7
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
The fixed patch for the bytecode interpreter and the new patch for enablement of the subpixel rendering are now incorporated into the latest freetype package update in Slackware-current.
Go get it.

Eric
 
Old 04-21-2007, 08:44 PM   #8
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Original Poster
Rep: Reputation: 50
I got the (Slack-Current) fixed patch source from a mirror.

Works very fine. Fonts appear at least as good; but, really (if there *really* is such a thing in existence as really)

Which reminds me of the book author Scott Peck's take on this where he states: "we can only approach reality".

So, (really) the fonts appear yet even a tiny bit better now.
--

FWIW

http://beranger.org/index.php?article=2787

Helped me to see what's been/is going on regards this arena.

I've a CRT monitor here.

I don't know how to (only for an LCD monitor) enable sub pixel hinting A.K.A. ClearType in KDE. But that's a whole another (KDE) topic.

--
Alan.
 
Old 04-22-2007, 07:59 AM   #9
BGSLC
LQ Newbie
 
Registered: Jul 2005
Distribution: slackware
Posts: 8

Rep: Reputation: 0
does not work for me
applied the patch in the slackbuild, but fonts still not ok
back to 2.1.9, works perfect, but i know it's a security risk
 
Old 04-22-2007, 10:51 AM   #10
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,784

Rep: Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460
Quote:
Originally Posted by Alien Bob
Ah, I had not read the comments too closely that you find right above
Code:
#define TT_CONFIG_OPTION_UNPATENTED_HINTING
... so if you leave that enabled while also enabling
Code:
#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
, it looks as if the patented algorithms still are not compiled in?
I.e. Petri Kaukasoina's patch with #define TT_CONFIG_OPTION_UNPATENTED_HINTING commented out is the one that should work?

Eric
Well, now I tried both TT_CONFIG_OPTION_UNPATENTED_HINTING defined and not. I could not see any difference between the two. So, I guess this comment in the options file means that it takes some effort at runtime to get the unpatented version on the screen:

Code:
  /* Define TT_CONFIG_OPTION_UNPATENTED_HINTING (in addition to            */
  /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER) to compile the unpatented      */
  /* work-around hinting system.  Note that for the moment, the algorithm  */
  /* is only used when selected at runtime through the parameter tag       */
  /* FT_PARAM_TAG_UNPATENTED_HINTING; or when the debug hook               */
  /* FT_DEBUG_HOOK_UNPATENTED_HINTING is globally activated.               */
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft is not able to patch its code! Nukem General 3 04-02-2004 12:39 PM
Applying patch to source code dax_neoburn Linux - Software 2 10-02-2003 08:38 PM
Slack [PHP/GD + Freetype] easy way? ThA-B Slackware 1 09-25-2003 11:06 AM
Hmm. I don't think my Slack has the kernel source code Brakki Slackware 8 07-06-2003 07:04 PM
Freetype-devel for freetype-2.1.4-1 (redhat 9) Goog Linux - Distributions 0 05-05-2003 06:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration