Solved FLAVOR is defined while this port does not have FLAVORS

I almost have this finished, but one line in my Make file is causing this error when I try to build:

Code:
===>  pygobject3-common-3.42.2 FLAVOR is defined (to py39) while this port                                                       
does not have FLAVORS.                                                                                                           
*** Error code 1                                                                                                                 
                                                                                                                                 
Stop.                                                                                                                            
make[1]: stopped in /usr/ports/devel/pygobject3-common                                                                           
*** Error code 1                                                                                                                 
                                                                                                                                 
Stop.                                                                                                                            
make: stopped in /usr/ports/security/xsser

This is my Makefile:

Code:
PORTNAME=       xsser                                                                                                            
PORTVERSION=    1.0                                                                                                              
CATEGORIES=     security                                                                                                         
MASTER_SITES=   https://teamsloth.net/                                                                                           
                                                                                                                                 
MAINTAINER=     notmyemail@gmail.com                                                                                             
COMMENT=        XSS Exploration                                                                                                  
WWW=            https://xsser.03c8.net                                                                                           
                                                                                                                                 
LICENSE=        GPLv3
                                                                                                       
FLAVORS=        py39                                                                                                             
FLAVOR?=        py39                                                                                                             
                                                                                                                                 
RUN_DEPENDS=    ${PYTHON_PKGNAMEPREFIX}pycurl>0:ftp/py-pycurl@${PY_FLAVOR} \                                                     
                ${PYTHON_PKGNAMEPREFIX}pygeoip>0:net/py-pygeoip@${PY_FLAVOR} \                                                   
                ${PYTHON_PKGNAMEPREFIX}gobject3>0:devel/py-gobject3@${PY_FLAVOR} \                                               
                ${PYTHON_PKGNAMEPREFIX}pygobject3-common>0:devel/pygobject3-common@${PY_FLAVOR} \                                
                ${PYTHON_PKGNAMEPREFIX}beautifulsoup>0:www/py-beautifulsoup@${PY_FLAVOR} \                                       
                ${PYTHON_PKGNAMEPREFIX}cairocffi>0:graphics/py-cairocffi@${PY_FLAVOR} \                                          
                ${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow@${PY_FLAVOR}                                                  
                                                                                                                                 
USES=           python                                                                                                           
USE_PYTHON=     autoplist concurrent distutils allflavors                                                                        
                                                                                                                                 
post-extract:                                                                                                                    
                ${CP} /usr/ports/security/${PORTNAME}/files/setup.py ${WRKSRC}/                                                  
                ${CP} /usr/ports/security/${PORTNAME}/work-${PY_FLAVOR}/${PORTNAME}-${PORTVERSION}/xsser ${LOCALBASE}/bin/xsser  
                                                                                                                                 
.include <bsd.port.mk>

I tried removing ${PY_FLAVOR} from the line with pygobject3-common, but nothing changed for me. I tried removing FLAVORS and FLAVOR?, but that didn't change anything either.

This is my distinfo:

Code:
TIMESTAMP = 1698626212                                                                                                           
SHA256 (xsser-1.0.tar.gz) = 1e26bb749b3a8d4db37e95d58f227efb383b7cb836cd917228846ef691e3bd52                                     
SIZE (xsser-1.0.tar.gz) = 17862873

Inside my files directory I have the following setup.py:

Code:
#!/usr/local/bin/python3.9                                                                                                       
# -*- coding: utf-8 -*-"                                                                                                         
# vim: set expandtab tabstop=4 shiftwidth=4:          

from setuptools import setup                                                                                                     
from setuptools.command.install import install                                                                                   
import os                                                                                                                        
import shutil                                                                                                                    
                                                                                                                                 
config_dir = '/usr/local/etc/xsser'                                                                                              
core_dir = '/usr/local/etc/xsser/core'                                                                                           
doc_dir = '/usr/local/etc/xsser/doc'                                                                                             
gtk_dir = '/usr/local/etc/xsser/gtk'                                                                                             
                                                                                                                                 
for path in [config_dir, core_dir, doc_dir, gtk_dir]:                                                                            
    os.makedirs(path, exist_ok=True)                                                                                             
                                                                                                                                 
dirs = ['core', 'doc', 'gtk']                                                                                                    
                                                                                                                                 
for i in dirs:                                                                                                                   
    local_dir = i  # Assuming 'core' is in the current working directory                                                         
    target_dir = '/usr/local/etc/xsser/' + i                                                                                     
                                                                                                                                 
    if os.path.exists(local_dir):                                                                                                
        for item in os.listdir(local_dir):                                                                                       
            local_item = os.path.join(local_dir, item)                                                                           
            target_item = os.path.join(target_dir, item)                                                                         
            # Check if the item is a file and copy it                                                                            
            if os.path.isfile(local_item):                                                                                       
                shutil.copy(local_item, target_item)                                                                             
            # Check if the item is a directory and copy it recursively                                                           
            elif os.path.isdir(local_item):                                                                                      
                shutil.copytree(local_item, target_item, dirs_exist_ok=True)                                                                                                                                                                                        
image_files = []                                                                                                                 
doc_files = []                                                                                                                   
gtk_doc_files = []                                                                                                               
for afile in os.listdir('doc'):                                                                                                  
    if afile != '.svn':                                                                                                          
        doc_files.append('doc/' + afile)                                                                                         
for afile in os.listdir('gtk/docs'):                                                                                             
    if afile != '.svn':                                                                                                          
        gtk_doc_files.append('gtk/docs/' + afile)                                                                                
data_files = ['gtk/images/world.png', 'gtk/images/xsser.jpg',                                                                    
              'gtk/images/xssericon_16x16.png',                                                                                  
              'gtk/images/xssericon_24x24.png',                                                                                  
              'gtk/map/GeoIP.dat']                                                                                               
gtk_files = ['gtk/xsser.ui']                                                                                                     
gtk_app_files = ['gtk/xsser.desktop']                                                                                            
setup(                                                                                                                           
    name = "xsser",                                                                                                              
    version = "1.8.4",                                                                                                           
    packages = ['core', 'core.fuzzing', 'core.post', 'core.driver'],                                                             
    data_files = [('/usr/share/doc/xsser/', doc_files),                                                                          
                  ('/usr/share/xsser/gtk/images/', data_files),                                                                  
                  ('/usr/share/xsser/gtk/docs/', gtk_doc_files),                                                                 
                  ('/usr/share/applications/', gtk_app_files),                                                                   
                  ('/usr/share/xsser/gtk/', gtk_files)],                                                                         
    scripts = ['xsser'],                                                                                                         
    test_suite = "tests"                                                                                                         
)

I confirmed if I remove the line with pygobject3-common from the Makefile, everything else builds without error. Any suggestions welcome.
 
Took me a while, but I finally found changing this line:

${PYTHON_PKGNAMEPREFIX}pygobject3-common>0:devel/pygobject3-common@${PY_FLAVOR} \

To this:

pygobject3-common>0:devel/pygobject3-common \

Then the port I was trying to make had some issues I found and corrected using portlint -A. Now it builds correctly. I still have more to do before submitting it, but hope to complete it soon. I don't know how to close this or mark it solved. Just wanted to update this in case others faced this issue.
 
Back
Top